Class: SimpleAuth::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_auth/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#logged_urlObject

Set the logged url. This will be used to redirect logged users to the dashboard page. Default to ‘dashboard_path`.



17
18
19
# File 'lib/simple_auth/config.rb', line 17

def logged_url
  @logged_url
end

#login_urlObject

Set the login url. This will be used to redirect unlogged users to the login page. Default to ‘login_path`.



12
13
14
# File 'lib/simple_auth/config.rb', line 12

def 
  @login_url
end

#scopesObject

Set which scopes will be activated. By default it enables ‘user` and `admin`.



7
8
9
# File 'lib/simple_auth/config.rb', line 7

def scopes
  @scopes
end

Instance Method Details

#install_helpers!Object



19
20
21
# File 'lib/simple_auth/config.rb', line 19

def install_helpers!
  ::ActionController::Base.include SimpleAuth::ActionController
end