How to paginate child records


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?


@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)

        - dan

Dan K. mailto:[email protected] tel:+1-415-233-1000

paginate :calls, :conditions = [‘customer_id = ?’, customer_id]