Forum: Ruby on Rails How to paginate a table using a relation with other table

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Mike (Guest)
on 2007-03-27 23:40
(Received via mailing list)

   I have this model

     has_many :tasks

     belongs_to :item

    I have a filter

   @task_pages, @tasks =paginate :tasks, :per_page => 10, :conditions
=> ["company_id = ?', company_id]

    How can I use a set of Items to return some records in Tasks, and
use it in Paginate?

     Item.find (:all, :conditions => ['model = ?','KJ-393'])

     and paginate just the tasks thar belongs to this Items?

Thank you
This topic is locked and can not be replied to.