Hi

   The first parameter to belongs_to is the association id So here 
auction_item_id being the foreign key according to convension by rails 
we can say

belongs_to :auction_item

   It will be taken as auction_item_id For example you can try

t.belongs_to  :auction_item
     instead of
t.integer  "auction_item_id"   in the above migration
    Defintion of belongs_to you can see at

rails/activerecord/lib/active_record/associations.rb, line 1001



Sijo
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to