Creating a gallery in Rails

Posted by raphael_turtle on Stack Overflow See other posts from Stack Overflow or by raphael_turtle
Published on 2010-05-12T10:50:39Z Indexed on 2010/05/12 10:54 UTC
Read the original article Hit count: 252

Filed under:
|

I'm creating a simple site with a gallery. I have a photos model which has a page for each photo with it's info and an image. I'm unsure how to create a gallery from the photo's.

The gallery model has_many photos, the photos model has_and_belongs_to_many galleries. I thought of adding a gallery.title field on each photo page so I'd have a list of photo's for each gallery then display them in a view. Is this a good way to make a gallery?

(I've looked through the code on some gallery apps on github, but most are outdated are too complicated for my needs.)

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about gallery