Wicked gem を使用してマルチフォーム ログイン システムを設定しようとしています。http://railscasts.com/episodes/346-wizard-forms-with-wickedの手順に従って、デバイスをインストールして正しく実行しています。
user_step_paths にリダイレクトされませんか? すべてはチュートリアルに記載されているとおりに行われますが、私はデバイスを使用しているため、デバイスに継承されたコントローラーでそれを行う必要があると推測していますか? コントローラー用の私のコードは次のとおりです。
users_controller.rb
class UsersController < Devise::RegistrationsController
def new
@user = User.new
end
def create
@user = User.new(params[:sign_up])
if @user.save
session[:user_id] = @user.id
redirect_to user_steps_path
else
redirect_to new_user_registration_path
end
end
end
users_steps_controller.rb
class UserStepsController < ApplicationController
include Wicked::Wizard
steps :education, :social
def show
render_wizard
end
end
ルート
get 'pages/home'
devise_for :users, :controllers => { :registrations => 'users'}
resources :user
resources :user_steps