I am trying to make sense of a pre-built app in which:
class Friendship < ActiveRecord::Base attr_accessible :status,:user,:friend belongs_to :user belongs_to :friend, :class_name => "User",:foreign_key => "friend_id" end I am confused by the attr_accessible part where he has supplied :user and :friend because they are not attributes in the friendship model. Is that just a short way for writing :user_id or friend_id or is he actually supplying the :user object and the :friend object? if they are indeed objects, what does that mean?