Consider 2 tables:
Player-> column player_id
Hit-> columns player_id, hit_player_id
I want one model for Player and one model for a Hit.
Any player has many hits against another player.
So from a Player I want to be able to get all the Hits, and from the
Hit get the hit Player.
On the other hand, from a Player I want to retrieve all Hits against
that player (were player_id = hits.hit_player_id)
and the player_id from that hit.
So far I have:
class Player < ActiveRecord::Base
class Hit < ActiveRecord::Base
But I can’t figure out how to map the ‘hit’ player.
Thanks for the help!