skunkwerk wrote: > Hi, > I have a 'person' model that belongs_to a 'group' model. I used > scaffolding to generate the form code for adding a new person, but I > want a select drop-down for selecting which group to assign a person > to. I looked at the rails form helpers guide, and tried a few > different things in the template, like: > > <%= f.select :vendor, @vendor %> > but i'm getting errors... > > what's the proper way to do this? is there any controller code > necessary? > > thanks!
here is it is f.select(:group_id,Group.all,:prompt => true) i think it should work -- 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 -~----------~----~----~----~------~----~------~--~---

