search for: expositioncontrol

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

2006 May 22
4
use join table in paginate
...:themes which maps to db entity painting id class Theme 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: @pai...