I''m trying to use observe_field to perform an AJAX action when a drop
down value is changed. The problem is i need to pass multiple
parameters to the action. For example:
<%= select_tag ''shipping_method'',
options_for_select(shipping_methods)
%>
<%= observe_field :shipping_method, :url => { :action =>
''update_shipping'' }, :with => "shipping_method"
%>
This works when i just need to pass the value of the select in the
parameter ''shipping_method'', but is there a way to pass
multiple
parameters? I want to be able to pass the value selected in the drop
down as well as a value you like the cost of the shipping method. So in
the action in the controller i would have access to
params[:shipping_method] and params[:shipping_price].
Any help would be greatly appreciated!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---