Displaying 1 result from an estimated 1 matches for "friends_of".
2006 Jan 06
2
Re: Some advice on DB modeling
...FERENCES
`users` (`id`)
)
My user.rb looks like this:
class User < ActiveRecord::Base
has_and_belongs_to_many :friends, :join_table => ''friends'',
:class_name => ''User'', :foreign_key => ''friend_id''
has_and_belongs_to_many :friends_of, :join_table => ''friends'',
:class_name => ''User'', :foreign_key => ''user_id'',
:association_foreign_key => ''friend_id''
attr_accessor :new_password
attr_accessor :friends
attr_accessor :friends_of
...
end...