search for: home_point

Displaying 1 result from an estimated 1 matches for "home_point".

Did you mean: home_print
2006 Feb 18
1
Questions about ActiveRecord
...ed home_id and guest_id to each match that link to the competing teams. My problem is telling Rails about this kind of relation. I want to be able to do something like this: # This should return all matches where team.id is home_id or guest_id: <% for match in @team.matches %> <%= match.home_points %> <% end %> Adding has_many(:matches) in team.rb and has_many(:teams) in match.rb didn''t work because there is no join table. That''s why I added another solution to the schema using a join table (bottom of the pasted file). But that led me to another problem, I don...