I have the following database scheme [company] id name [department] id name company_id [person] id name company_id [department_people] id staff_id department_id and my models class Company < ActiveRecord::Base has_many :departments has_many :people end class Department < ActiveRecord::Base has_many :people end class Person < ActiveRecord::Base belongs_to :department_people belongs_to :department, :through => :department_people belongs_to :company end class DepartmentPeople < ActiveRecord::Base belongs_to :company belongs_to :person end So a person in a company can be in a department. I what to add a finder method "get_available_staff" to my department model that returns People that are in the company that the department is part of (department.company_id = company.id) Can anyone point me in the right direction ??? thanks RailsNewbie --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---