Hi,
In the firm I work, we''re disabling table name pluralization because
this complies to our standards.
So, suppose I have a table client and a table contact_person (which
has a client_id). I also have the models Client and ContactPerson for
these.
In my Client class, I would have :
has_many :contact_person
and in the ContactPerson class I would have
belongs_to :client
Is this correct? Or do I need to pluralize has_many :contact_person?
Also, how do I get the collection of the ContactPersons associated to
a specific Client object? I tried @client.contactPersons and
@client.contactPeople, but neither seems to work.
I know this is all basic stuff, but I''m still trying to get my head
around ruby/rails.
Thanks for your time,
Sven Magnus
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---