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

#flash_message_keyObject

Set the flash message key. This will be used when setting messages for unlogged/unauthorized users.



21
22
23
# File 'lib/simple_auth/config.rb', line 21

def flash_message_key
  @flash_message_key
end

#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



23
24
25
# File 'lib/simple_auth/config.rb', line 23

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