I'm using the wicked gem After I hit RequestStepsController#update, I'm being redirected to /request_steps/wicked_finish. I have no idea why. Any suggestions? If it worked as I expected it to, then the next step after updating the object would be :the_frame, as described in steps.
From the log:
Started PUT "/request_steps/77" for 127.0.0.1 Processing by RequestStepsController#update as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"XXX", "request"=>{"background_information"=>"prefilled"}, "commit"=>"C 7"} Redirected to http://localhost:3000/request_steps/wicked_finish Started GET "/request_steps/wicked_finish" for 127.0.0.1 Processing by RequestStepsController#show as HTML Parameters: {"id"=>"wicked_finish"} Completed 404 Not Found in 180ms ActiveRecord::RecordNotFound - Couldn't find Request without an ID:
This is my RequestStepsController
class RequestStepsController < ApplicationController include Wicked::Wizard
steps :background_information,
:no_list_what_can_go_wrong,
:the_frame,
:select_group
def show
@request = Request.find(params[:request])
render_wizard
end
def update
@request = Request.find(params[:id])
@request.update_attributes(request_params)
render_wizard @request
end
def request_params
params.require(:request).permit(:title, :description, :goal,
:request_group_id,
:repository_url,
:background_information
)
end
end
This is my form:
= simple_form_for(@request, url: wizard_path(@request), method: :put, :html => { :class => 'form-inline span8 help_text' }) do |f|