search for: recs_per_page

Displaying 2 results from an estimated 2 matches for "recs_per_page".

2006 Jun 01
9
access model from controller
Hello, Rather new to RoR, so I''m not sure about the terminology and such :-/ . My question is: how could I know the model which is associated to a controller? For example: - controller class is TestController, which is a subclass of ApplicationController - associated model class is Test How could I write some code in a method of ApplicationController to dermine the current
2005 Nov 02
1
getting pagination to work on joined tables
...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 = @reos_pages.current.to_sql reo_ids = Reo.find :all, :conditions => conds.join('' AND ''), :joins => ''JOIN lang_reos ON reos.id = reo_id'',...