In simple_form view, the submit button is like this:
<%= f.button :submit, 'Save' %>
We are trying to pass a params subaction
when clicking the Save
button. The params[:subaction]
should have value of 'update' after clicking the button. Here is what we tried in view but it did not work:
<%= f.button :submit, 'Save', :subaction => 'update' %>
Is there a way to pass a value in params[:subaction]
when clicking the Save
button?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…