Created
March 7, 2012 14:38
-
-
Save rafamvc/1993514 to your computer and use it in GitHub Desktop.
Revisions
-
rafamvc created this gist
Mar 7, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ <%= simple_form_for(@model, :url => step2_two_step_new_path, :method => :post) do |form| %> <%= form.input :name %> <%= form.input :description %> <%= form.button :submit, "Next" %> <% end %> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ <%= simple_form_for(@model) do |form| %> <%= form.input :name, as: :hidden %> <%= form.input :description, as: :hidden %> <%= form.input :extra_field %> <%= form.input :extra_field2 %> <%= form.button :submit, "create" %> <% end %> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ class TwoStepNewController < ApplicationController def new @model = Model.new end # Make sure you add step2 as a collection method on your routes resources. def step2 @model = Model.new(params[:model]) end end