I have a form with two submit buttons so that I can perform the following tasks:
<% form_for(something) do |f| %> .. <%= f.submit 'A' %> <%= f.submit 'B' %> .. <% end %>
Controller:
def <controller action> if params[:commit] == 'A'
So my question is: how can I say that when a form is submitted using the "A" button, the form:
<% form_for(something), :remote => true do |f| %>
And when it is subalized with button B, its normal form is:
<% form_for(something) do |f| %>
ruby-on-rails ruby-on-rails-3
John Smith Aug 27 '13 at 22:08 2013-08-27 22:08
source share