Displaying 1 result from an estimated 1 matches for "team_configs".
2005 Nov 09
0
Sorting has_many relationships
...t a League model, which has_many TeamConfigs which in turn
belongs_to a Team object. A TeamConfig is basically the
representation of a Team for one season, so the name of the team is
an attribute of the Team model.
What I''d like to do is something like this:
class league
has_many :team_configs, :order => ''team.name''
end
Of course, this doesn''t work. So I''m wondering if I''m missing some
obvious way to do this, or if I have to sort my TeamConfigs with
ruby. Any insight would be much appreciated.
Cheers,
greg