Railscast # 38과 함께 여러 제출 작업으로 formtastic 양식을 설정하려고합니다. Formtastic에서 이와 비슷한 것은 무엇입니까? formtastic을 사용한 여러 제출 작업
<%= submit_tag 'Create' %>
<%= submit_tag 'Preview', :name => 'preview_button' %>
나를 바라지 만
commit_button
가 2.1.0에서 사용되지 않는 것처럼 보이는, 그리고 새로운 구문을 알아낼 수 없습니다했다.
내 코드는 다음과 같습니다. 나는 각 내가 다르게 처리 할 동일한 컨트롤러로 이동 버튼을 제출하고 싶습니다 :
# Use prepaid credits to checkout
<%= f.action :submit, :as => :button, :label => "Order Critique (1 credit will be spent)", :button_html => { :class => "btn btn-primary", :disable_with => 'Processing...' } %>
# Use credit card to checkout
<%= f.action :submit, :as => :button, :label => "Order Critique ($10)", :button_html => { :class => "btn btn-primary", :disable_with => 'Processing...' } %>