Do you have: has_many :players
in your Team model? In order to access players in a team or team in Player object you must define relations in the model. In the later case it should be: belongs_to :team On Dec 18, 7:57 am, Bob Sanders <[email protected]> wrote: > I'm trying to find all players on an active team, and this is just > stumping me. > > I defined the "active team" by: > > @active_team = Team.find(:all, :conditions => ["active=?", true]) > > Now, I'm trying to use in my loop: > > @active_team.players > > but that just gives me an "undefined method `players'". I know I'm > probably missing something really simple. Any idea? > -- > Posted viahttp://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 [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 -~----------~----~----~----~------~----~------~--~---

