[Rails] Drop down with model info
I have this code:
<%= f.select :name, [@m.each do |n|
[ n.first_name , n.first_name ]
end], :class => 'gam' %>
and i want it to display each of the first_name records from the table
that @m is associated with in a drop-down. When i test this code the
only option in the drop down menu it #Player:0x3c88008> (Player is the
name of the table that @m is associated with) i know from previous
testing that everything works fine besides this code.
Any ideas or help would be fantastic!
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home