Module: Sorcery::Controller::Config
- Defined in:
- lib/sorcery/controller.rb
Class Attribute Summary collapse
-
.after_config ⇒ Object
Returns the value of attribute after_config.
-
.after_failed_login ⇒ Object
Returns the value of attribute after_failed_login.
-
.after_login ⇒ Object
Returns the value of attribute after_login.
-
.after_logout ⇒ Object
Returns the value of attribute after_logout.
-
.before_logout ⇒ Object
Returns the value of attribute before_logout.
-
.login_sources ⇒ Object
Returns the value of attribute login_sources.
-
.not_authenticated_action ⇒ Object
Returns the value of attribute not_authenticated_action.
-
.save_return_to_url ⇒ Object
Returns the value of attribute save_return_to_url.
-
.submodules ⇒ Object
Returns the value of attribute submodules.
-
.user_class ⇒ Object
Returns the value of attribute user_class.
Class Method Summary collapse
- .init! ⇒ Object
-
.reset! ⇒ Object
Resets all configuration options to their default values.
- .update! ⇒ Object
Class Attribute Details
.after_config ⇒ Object
Returns the value of attribute after_config.
125 126 127 |
# File 'lib/sorcery/controller.rb', line 125 def after_config @after_config end |
.after_failed_login ⇒ Object
Returns the value of attribute after_failed_login.
125 126 127 |
# File 'lib/sorcery/controller.rb', line 125 def after_failed_login @after_failed_login end |
.after_login ⇒ Object
Returns the value of attribute after_login.
125 126 127 |
# File 'lib/sorcery/controller.rb', line 125 def after_login @after_login end |
.after_logout ⇒ Object
Returns the value of attribute after_logout.
125 126 127 |
# File 'lib/sorcery/controller.rb', line 125 def after_logout @after_logout end |
.before_logout ⇒ Object
Returns the value of attribute before_logout.
125 126 127 |
# File 'lib/sorcery/controller.rb', line 125 def before_logout @before_logout end |
.login_sources ⇒ Object
Returns the value of attribute login_sources.
125 126 127 |
# File 'lib/sorcery/controller.rb', line 125 def login_sources @login_sources end |
.not_authenticated_action ⇒ Object
Returns the value of attribute not_authenticated_action.
125 126 127 |
# File 'lib/sorcery/controller.rb', line 125 def not_authenticated_action @not_authenticated_action end |
.save_return_to_url ⇒ Object
Returns the value of attribute save_return_to_url.
125 126 127 |
# File 'lib/sorcery/controller.rb', line 125 def save_return_to_url @save_return_to_url end |
.submodules ⇒ Object
Returns the value of attribute submodules.
125 126 127 |
# File 'lib/sorcery/controller.rb', line 125 def submodules @submodules end |
.user_class ⇒ Object
Returns the value of attribute user_class.
125 126 127 |
# File 'lib/sorcery/controller.rb', line 125 def user_class @user_class end |
Class Method Details
.init! ⇒ Object
142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/sorcery/controller.rb', line 142 def init! @defaults = { :@user_class => nil, :@submodules => [], :@not_authenticated_action => :not_authenticated, :@login_sources => [], :@after_login => [], :@after_failed_login => [], :@before_logout => [], :@after_logout => [], :@after_config => [], :@save_return_to_url => true } end |
.reset! ⇒ Object
Resets all configuration options to their default values.
158 159 160 161 162 |
# File 'lib/sorcery/controller.rb', line 158 def reset! @defaults.each do |k,v| instance_variable_set(k,v) end end |
.update! ⇒ Object
164 165 166 167 168 |
# File 'lib/sorcery/controller.rb', line 164 def update! @defaults.each do |k,v| instance_variable_set(k,v) if !instance_variable_defined?(k) end end |