Ruby on Rails
Wednesday, December 19, 2012
Hello,
I have a dropdown in the UI. There are many oprions.
How do I send the parameter from the dropdown - the selected value to the controller?
I have tried :-
1. <%= select_tag 'name', options_for_select(@list, :selected) %>
2. <%= select("audit", "value",options_for_select([["User Registration", "USER_REGISTRATION"], ["Download", "USER_REPORT"]], :selected => params[:value]) %>
I am not getting any parameters passed to the controller.
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.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/fk7PY0E_DrMJ.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment