Rails: remote_form_for not playing nicely with multiple submit_tags
Posted
by grifaton
on Stack Overflow
See other posts from Stack Overflow
or by grifaton
Published on 2010-04-23T21:54:05Z
Indexed on
2010/04/23
22:13 UTC
Read the original article
Hit count: 231
ruby-on-rails
|AJAX
I have a form with the following:
<% form_remote_tag :url => {:action => :wotsit} do %>
<%= submit_tag "Foo" %>
<%= submit_tag "Bah" %>
<% end %>
I would expect that the submitted parameters would reflect which button had been clicked. However, no matter which button I click, the submitted parameters include "commit"=>"Foo"
.
What am I doing wrong?
© Stack Overflow or respective owner