search for: painting_pag

Displaying 1 result from an estimated 1 matches for "painting_pag".

Did you mean: painting_pages
2006 May 22
4
use join table in paginate
...has_and_belongs_to_many :paintings which maps to db entity theme id And of course the join table paintings_themes painting_id theme_id So, paintings have one or more themes, and a theme can belong to more paintings. In my ExpositionController, which shows the paintings, I have: @painting_pages, @paintings = paginate :paintings, :per_page => 10 But now I want only to show paintings with a certain theme (still paginated of course). So I have to put a :condition in the paginating code. I''ve tried something like: @painting_pages, @paintings = paginate :paintings, :per_page...