The_programmer
2010-Mar-24 22:38 UTC
Select_tag with options_for_select not populating DB.
I''m trying to get my animal app to let users populate info about each animal. The code below partially works. It shows the drop down menu, and it shows the names of what I wanted it to be the names of the Databases. I don''t know how to make it work so it shows the name dog and than you hit submit and it appears in the dog view. When I hit submit it just makes a new view under the current database, when I want it to change to the one selected. I changed variables and instances for privacy reasons(I''m sure most people do.) <% form_for :animals do |f| %> <%= f.error_messages %> <%= f.label :update %> <br /> <%= f.text_area :updates, :rows => 6 %> <br /> <%= select_tag "update", options_for_select(%w{dogs_info feline_info}) %> <%= f.submit "submit" %> <% end %> I really appreciate any help! Thank you. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.