title: Proper way to find records for a certain foreign key
body: <p>I have two Models called User and Membership.
  User has_many :memberships
  Membership belongs_to :user</p>
  
  <p>What is the proper way to modify MembershipsController's index method to set @memberships to all the memberships there are for the user "session[:user_id]"?</p>
  
  <p>I tried something like:
  @memberships = Membership.find(:all, :conditions => ["user_id = ?", session[:user_id]] )</p>
  
  <p>but then Rails is Selecting from users instead of memberships:</p>
  
  <pre><code>Rendering memberships/index
    ←[4;35;1mUser Columns (3.0ms)←[0m   ←[0mSHOW FIELDS FROM `users`←[0m
    ←[4;36;1mUser Load (1.0ms)←[0m   ←[0;1mSELECT * FROM `users` WHERE (`users`.`id` = 1) LIMIT
    ←[4;35;1mCACHE (0.0ms)←[0m   ←[0mSELECT * FROM `users` WHERE (`users`.`id` = 1) LIMIT 1←[0m
  </code></pre>