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`.



15
16
17
# File 'lib/simple_auth/config.rb', line 15

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`.



10
11
12
# File 'lib/simple_auth/config.rb', line 10

def 
  @login_url
end

#scopesObject

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



5
6
7
# File 'lib/simple_auth/config.rb', line 5

def scopes
  @scopes
end

Instance Method Details

#install_helpers!Object



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

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