UserモデルとAgentモデルの2つがあるのですが、sign_inのurlを変更した後のリダイレクトurlがおかしくなってしまいます。
下記がおかしくなる手順とcontrollerになります。
http://localhost:3000/agents/sign_in
に遷移する- urlを
http://localhost:3000
に変更する - リダイレクト先が
http://localhost:3000/users/sign_in
に遷移してしまう
rb
1class StaticPagesController < ApplicationController 2 before_action :authenticate_agent!, only: [:home] 3 before_action :authenticate_user!, only: [:home] 4 5 def home 6 end 7end
どのようにすればhttp://localhost:3000/agents/sign_in
に戻ってくるのでしょうか?
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2022/04/16 05:22
2022/04/16 10:40
退会済みユーザー
2022/04/16 11:55
2022/04/16 12:40