module Authenticatable::Controllers::UrlHelpers

Public Instance Methods

after_sign_in_path(_resource, _resource_name) click to toggle source

The default url to redirect to after sign in. This URL can be overriden in your ApplicationController like this:

def after_sign_in_path(resource)
  dashboard_path
end
# File lib/authenticatable/controllers/url_helpers.rb, line 62
def after_sign_in_path(_resource, _resource_name)
  root_url
end
edit_password_url(resource_name, token) click to toggle source
# File lib/authenticatable/controllers/url_helpers.rb, line 49
def edit_password_url(resource_name, token)
  public_send("edit_#{resource_name}_password_url", token: token)
end
new_password_path(resource_name) click to toggle source
# File lib/authenticatable/controllers/url_helpers.rb, line 37
def new_password_path(resource_name)
  :"new_#{resource_name}_password"
end
new_registration_path(resource_name) click to toggle source
# File lib/authenticatable/controllers/url_helpers.rb, line 29
def new_registration_path(resource_name)
  :"new_#{resource_name}_registration"
end
new_session_path(resource_name) click to toggle source

Helper methods to generate a generic path helpers dynamically in views, based on the current scope. Example: session_path(‘user’) => user_session_path

# File lib/authenticatable/controllers/url_helpers.rb, line 21
def new_session_path(resource_name)
  :"new_#{resource_name}_session"
end
password_path(resource_name) click to toggle source
# File lib/authenticatable/controllers/url_helpers.rb, line 41
def password_path(resource_name)
  :"#{resource_name}_password"
end
registration_path(resource_name) click to toggle source
# File lib/authenticatable/controllers/url_helpers.rb, line 33
def registration_path(resource_name)
  :"#{resource_name}_registration"
end
session_path(resource_name) click to toggle source
# File lib/authenticatable/controllers/url_helpers.rb, line 25
def session_path(resource_name)
  :"#{resource_name}_session"
end
update_password_path(resource_name, token) click to toggle source
# File lib/authenticatable/controllers/url_helpers.rb, line 45
def update_password_path(resource_name, token)
  public_send("update_#{resource_name}_password_path", token: token)
end