I have two submit_tag on my form and I would like to send a different parameter on each. How can I do this?
My form view:
<%= form_tag(some_path, :method => "get") do %>
<%= text_field_tag :number %>
<%= text_field_tag :name %>
<%= submit_tag "Op01", class: "btn_search", my_parameter: 1 %>
<%= submit_tag "Op02", class: "btn_search", my_parameter: 2 %>
<% end %>
And on my controller:
@oper_type = params[:my_parameter]
But when I display the @oper_type it is always nil.
Thanks.