Hi again, thanks so much for your help i really appreciate it. I wanted
to write another association like you said before but there is no
Alphabet_Partner class to write it in. Its just a self reference to
Alphabet table.
Alphabet_Partner is only defined in
class Alphabet < ActiveRecord::Base
belongs_to :category
has_many :pairings
has_many :alphabet_partners,
:through => :pairings
so after googling today im wondering how do i write the equivalent
of
classs Alphabet_Partner < AR:B
has_many :pairings
has_many :alphabets,:through => :pairings
The main reason why im trying to keep only one record in pairings is to
make it easier to attach comments. Under my current setup If users
comment on the pairing ab then id have to attach those comments to ba as
well. The same goes for removing comments. I cant find any tutorials
dealing with this. The only ones availalbe are for social networks and
friendships. But no one ever comments on a friendship like "Oh they make
such a lovely couple!" ;-) so im wondering how its done. And i do need
the ability to do a.alphabet_partners and b.alphabet_partners.
--
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
-~----------~----~----~----~------~----~------~--~---