I am using a select menu to allow people to pick an item and be taken to
a new page containing that item’s data. Pretty straightforward stuff.
Except that I cannot quite figure out how to do this in Rails.
I do not understand how to grab the variable from the select menu.
Any suggestions?
Hi Ricardo,
Ricardo ricardito
I am using a select menu to allow people to pick
an item and be taken to a new page containing that
item’s data. Pretty straightforward stuff. Except that
I cannot quite figure out how to do this in Rails.
I do not understand how to grab the variable from the
select menu.
It comes to the controller action in the params hash when the form’s
submitted, just like a text_field’s value does. Nothing special.
hth,
Bill
I do not understand how to grab the variable from the select menu.
model from this example
PLEASE CHOOSE DATAFIELD
<% @objects.each do |object| %>
" >
<%= @object.dataField %>
<%end%>