On Aug 21, 12:16 am, nick ger <rails-mailing-l...@andreas-s.net> wrote: > > This obviously breaks cause there is no direct association between two > models. > belongs_to with a foreign_key - won't work cause I can't change the > primary keys on models. Rails doesn't support secondary keys. So can > somebody suggest a way to do it? > both has_many and belongs_to take a :primary_key option (which defaults to id). Is this what you are looking for?
Fred --~--~---------~--~----~------------~-------~--~----~ 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@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 -~----------~----~----~----~------~----~------~--~---