Topic: can has_and_belongs_to_many reference itself?
I have a case where users have friends, but friends are really users.
I'd like to have a users_friends table with user_id and friend_id, but friend_id is really an alias for user_id and there is no friend table.
Can this work?
I'm thinking it would be something like this in user.rb
:class_name => "User",
:foreign_key => "friend_id"
but really its the users that have many friends.
Last edited by jwattenmaker (2007-03-26 11:56:43)