Forum: Ruby on Rails I need help with self referential habtm

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
916981dcb90882ae0f984dc33de0a592?d=identicon&s=25 Felipe Vergara (Guest)
on 2009-01-02 17:20
(Received via mailing list)
Hello!

I need some help with self referential habtm associations:

I have a table inscripted and an inscripted may have a dependant, that
works
ok with this
has_and_belongs_to_many :all_friends,
:class_name => "Inscrito",
:join_table => "related_inscritos",
:foreign_key => "related_inscrito_id",
:association_foreign_key => "main_inscrito_id"

i have related_inscritos table to save the association.
But now I need to add a type of relation for each association, does
anyone
know how to do this??

Please any help will be very useful!!

Thanks
--
Felipe Vergara Contesse
Ingeniería Civil Industrial UC
This topic is locked and can not be replied to.