3d523b84fc
in controller concerns that are mixed into other engines' controllers. This prevents errors like: > NoMethodError: undefined method 'session_menu_url' for an instance of ActiveStorage::DirectUploadsController See also912bb8a8and5ee10800
18 lines
319 B
Ruby
18 lines
319 B
Ruby
module LoginHelper
|
|
def login_url
|
|
main_app.new_session_path(script_name: nil)
|
|
end
|
|
|
|
def logout_url
|
|
main_app.new_session_path
|
|
end
|
|
|
|
def redirect_to_login_url
|
|
redirect_to login_url, allow_other_host: true
|
|
end
|
|
|
|
def redirect_to_logout_url
|
|
redirect_to logout_url, allow_other_host: true
|
|
end
|
|
end
|