Why don't you just make both fields plain text attributes of the
author object?
On 7/19/10 5:53 PM, Frederick Cheung wrote:
On Jul 19, 9:59 pm, Solidify<max.holtm...@gmail.com> wrote:
Hi everyone, I have a simple question:
an author has a place of birth and a place of death. Both places
should come from the same table (cities). This should be a
many_to_many relationship, because one author may be born in the same
city where the other author dies.
If I were you I'd have two belongs_to associations, one for the
birthplace and one for the death location. I don't think many-to-many
is appropriate, unless multiple locations can be associated with a
person's birth/death
Fred
Now in the authors-table, one city_id would not be enough, it has to
be two fields, one for birth, one for death. but then, the
@author.city would not work anymore. Could anyone give me a hint how
to solve this?
--
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-t...@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.