Hi Ar, Actually I realized this won't work because players can be on multiple teams and can be benched on one team but not the other. Therefore it can't be an attribute of the player, it has to be an attribute of the team. Looks like I'll have to go back to my old idea. -Frank
On Tue, Mar 2, 2010 at 6:22 AM, Aldric Giacomoni <[email protected]> wrote: > Frank Kim wrote: >> Hi Ar, >> The attribute idea makes a lot of sense. If I did it that way then I >> could use the same join table. However I would have to use specify >> custom SQL for how to select from it, right? Or is there a better >> way? > > You could just have "benched" be a boolean field in the database. If > it's true, the player's on the bench. If it's false, he's on the field. > Then you can do this: > > player = Player.find_by_last_name "Ronaldo" > player.benched = true # Be a team player, Ronaldo! > -- > Posted via http://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. > > -- Frank Kim http://betweengo.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.

