search for: reos_pag

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

Did you mean: regs_page
2005 Nov 02
1
getting pagination to work on joined tables
As soon as I use Model.find(:all, :include => [...], :limit => 3) I loose associations and can''t do :conditions on joined tables. I''m not able to do pagination in such association. Only solution I came up with is this beast: # I set up a paginator: @reos_pages = Paginator.new self, Reo.count(conds.join('' AND ''), ''JOIN lang_reos ON reos.id = reo_id''), RECS_PER_PAGE, params[:page] # then I find out which ids count on for current page limit, offset =...