@customer_pages, @customers = paginate( :customers, :per_page =>
8, :include => :calls)
Or, you might want to switch that around:
paginate( :calls, :per_page => 8, :include => :customers)
http://api.rubyonrails.com/classes/ActionController/
Pagination.html#M000104
- dan
--
Dan Kohn <mailto:dan@dankohn.com>
<http://www.dankohn.com/> <tel:+1-415-233-1000>
On Jul 23, 2006, at 12:33 AM, Remco Hh wrote:
> hi
>
> i know i can do:
>
> @customer_pages, @customers = paginate :customers, :per_page => 8
>
> but these customers have helpdesk calls which are child records. I
> hoped
> i could do something like paginate customers.calls, but dat
doesn''t
> work
>
> what is the best way to get a paginated list of child records?
>
> remco
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails