Here is my problem. I want to pass the value from number_field_tag to the rails controller through link_to.
here is a view
:
<%= number_field_tag :quantity %>
<% link_to "do something", :controller => 'somecontroller', :action => 'dosomething', :pass_value_from_here => 'quantity' %>
and
controller:
def dosomething
@ivar = Model.new(:quantity => :value_passed_from_link_to )
# do somthing
end
Plus,
I am not trying to use form
. I have some other params too to be passed through link_to
.
for e.g.
<%link_to "do something", :controller => "somecontroller", :action=>'dosomething', :pass_value_from_text_field => 'quantity', :some_other_value_from_some_other_model %>
thank you in advance.