それはおかしい。カスタムユーザー登録を作成していて、ユーザー作成後にOTHERページにリダイレクトしたいのですが、showactionを呼び出したいと思います。
これが私のコントローラーです:
def create
@user = User.new(params[:user])
respond_to do |format|
if @user.save
format.html { redirect_to users_verify_path }
else
format.html { render action: "new" }
end
end
end def verify ... end inroutes.rb:
resources :users
root :to => 'users#new'
get "users/verify"
アクションの名前をSHOWに変更すると、すべてが機能しています。VERIFYという名前を付けると、次のように表示されます。
Unknown action
The action 'show' could not be found for UsersController
アクションショーを削除したので、明らかなエラーです。しかし、なぜそれが表示にリダイレクトされているのですか?