Displaying 1 result from an estimated 1 matches for "friend_user".
Did you mean:
befriend_user
2006 Mar 31
6
Adding objects to a :through association
So I''m one of those nasty people building a self-referential
habtm-like Association using the funky new :through stuff. This is
about users having friends, so here''s my user.rb:
class User < ActiveRecord::Base
has_many :friendships, :foreign_key => ''user_id''
has_many :friends, :through => :friendships, :source => :friend
end
And here''s