Method: Devise::Models::Lockable::ClassMethods#unlock_strategy_enabled?

Defined in:
lib/devise/models/lockable.rb

#unlock_strategy_enabled?(strategy) ⇒ Boolean

Is the unlock enabled for the given unlock strategy?

Returns:

  • (Boolean)


186
187
188
189
# File 'lib/devise/models/lockable.rb', line 186

def unlock_strategy_enabled?(strategy)
  self.unlock_strategy == strategy ||
    (self.unlock_strategy == :both && BOTH_STRATEGIES.include?(strategy))
end