Method: Devise::PasswordsController#unlockable?

Defined in:
app/controllers/devise/passwords_controller.rb

#unlockable?(resource) ⇒ Boolean (protected)

Check if proper Lockable module methods are present & unlock strategy allows to unlock resource on password reset

Returns:



74
75
76
77
78
# File 'app/controllers/devise/passwords_controller.rb', line 74

def unlockable?(resource)
  resource.respond_to?(:unlock_access!) &&
    resource.respond_to?(:unlock_strategy_enabled?) &&
    resource.unlock_strategy_enabled?(:email)
end