Thanks. one thing I noticed is that it's ":class_name" not just ":class"
(2.3.3)

Rick Denatale wrote:

> 
> You need to give the association a different name, and a few other 
> things
> 
> class User
>    has_and_belongs_to_many :friends,
>                                             :class => "User",
>                                            :association_foreign_key =>
> "friend_id",
>                                            :join_table => 
> "friends_users"
> end
> 
> 
> You then need to make a join table named "friends_users" with no
> primary key and user_id and friend_id columns.
> 
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to