MailingList


Foreign Key relation between translation and language

by Stefano Grioni :: Rate this Message:

Reply to Author | View in Thread

Hello,

I was wondering, why does Translation have a

:belongs_to language

line when Language doesn't have any

:have_many :translations

For my part, I would add that line as well as a foreign key between
Translation.language_id and Language.id . This would allow to do
something like :

Language.find_by_native_name("German").translations

In order to get them all in one line. It is particularly  interesting
when you've got to extract all the available translations in one shot in
order to give them to a translator. What do you think?

Bye

 « Return to Thread: Foreign Key relation between translation and language