Thanks for your reply Fred, but the fk name is ok, the problem is that the has_one relation goes to the wrong table, it should go to the child class, not to the parent class...
On Mon, 2010-09-13 at 01:45 -0700, Frederick Cheung wrote: > > On Sep 13, 8:47 am, Javier Ruiz <jr...@javiruiz.org> wrote: > > I even tried to force the class name like: > > > > class Anotherclass < ActiveRecord::Base > > has_one :childclass, :class_name => "Childclass" > > end > > > > But same thing, the has_one relation goes to parent class to try to find > > the relational id. > > If you want to change the name of the foreign key, use > the :foreign_key option. > > > Fred > > > > Anyone can help with this please?? > > Thanks in advance! > -- 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.