Module: SimpleUserAuth::Controller::ClassMethods
- Defined in:
- lib/simple_user_auth.rb
Instance Method Summary collapse
-
#can_sign_in(model, args = {}) ⇒ Object
The user model you’ll be using.
Instance Method Details
#can_sign_in(model, args = {}) ⇒ Object
The user model you’ll be using. e.g. can_sign_in :user An optional callback specified with :deny is available that will be called upon authentication failure. e.g. can_sign_in :user, :deny => :my_deny_callback
127 128 129 130 131 |
# File 'lib/simple_user_auth.rb', line 127 def can_sign_in(model, args = {}) klass = Kernel.const_get(model.to_s.camelize) self.user_model_for_sign_in = klass self.deny_access_callback = args[:deny] end |