Thank you! On May 4, 10:15 am, Matt Jones <[email protected]> wrote: > On May 4, 2011, at 1:07 PM, Tuishimi wrote: > > > Can I just do something like: > > > belongs_to :OTHER_A, :table=>'A'? > > Just about - the option you're looking for is :class_name, which tells Rails > to not guess the model on the other end from the name of the association. In > other words, something like this: > > belongs_to :some_totally_random_name, :class_name => 'SomeModel' > > The Hobofields generator will pick this up automatically and create a > 'some_totally_random_name_id' field on the model, so you shouldn't need to > add anything to the fields block. > > --Matt Jones
-- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
