デバイスでログアウトしようとしていますが、リダイレクトせずに! そのため、ログアウト後のリダイレクトを無効にしたいと考えています。その理由は、代わりに特定のテンプレートをレンダリングしたいからです。 ユーザーをリダイレクトせずにデバイスからログアウトする方法 --> このメソッドのみ <--? 私はすでにdeviseセッションコントローラーをオーバーライドしています。
私のメソッド(application_controller.rbのフィルターの前から呼び出されます)
def check_concurrent_session
if user_signed_in?
if current_user && !(session[:token] == current_user.login_token)
render :template => "users/logout_duplex", :layout => "application", :locals => { sub_layout => "left" }
# The next line always redirects to signout_path
# I want to disable the complete redirect so it just logs out and shows the rendered template
Devise.sign_out_all_scopes ? sign_out : sign_out(@user)
return
end
end
end