Hi. I have the following models class User < ActiveRecord::Base has_and_belongs_to_many :projects end class Project < ActiveRecord::Base has_many :castings, :dependent => :destroy has_many :candidates, :through => :castings has_and_belongs_to_many :users end class Candidate < ActiveRecord::Base has_many :castings, :dependent => :destroy has_many :projects, :through => :castings, :uniq => true end class Casting < ActiveRecord::Base belongs_to :project belongs_to :candidate end What I need is when I issue a Candidate.find that it will only return candidates for which the user has access to (via the projects_users habtm). I also need a way to check if the user has access to a specific candidate. Thank you --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---