912bb8a8e5
ref: https://app.fizzy.do/5986089/cards/2469 ref: https://github.com/basecamp/fizzy-saas/pull/20
20 lines
441 B
Ruby
20 lines
441 B
Ruby
module LoginHelper
|
|
def login_url
|
|
# Use main_app because this helper may be invoked from an engine controller
|
|
# that inherits from AdminController.
|
|
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
|