Your associations and table columns don't match. You have to tell
Rails how to map hitter and hittee if you are not following
convention. By default foreign key for a belongs_to association is the
name of the association with an "_id" suffix.

So if you want to follow convention, you change Hit-table to be like
this:

Hit {
   id:integer
   hitter_id:integer
   hittee_id:integer
}

and change Player-class to use those column names (like in Matt Jones'
example).
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to