Class: Clearance::DefaultSignInGuard
- Inherits:
-
SignInGuard
- Object
- SignInGuard
- Clearance::DefaultSignInGuard
- Defined in:
- lib/clearance/default_sign_in_guard.rb
Instance Method Summary collapse
Methods inherited from SignInGuard
#failure, #initialize, #next_guard, #success
Constructor Details
This class inherits a constructor from Clearance::SignInGuard
Instance Method Details
#call ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/clearance/default_sign_in_guard.rb', line 3 def call if session.signed_in? success else failure .html_safe end end |
#default_failure_message ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/clearance/default_sign_in_guard.rb', line 11 def I18n.t( :bad_email_or_password, scope: [:clearance, :controllers, :sessions], default: I18n.t('flashes.failure_after_create').html_safe ) end |