Method: Devise::Models::Authenticatable#valid_for_authentication?

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

#valid_for_authentication?Boolean

Check if the current object is valid for authentication. This method and find_for_authentication are the methods used in a Warden::Strategy to check if a model should be signed in or not.

However, you should not overwrite this method, you should overwrite active_for_authentication? and inactive_message instead.



81
82
83
# File 'lib/devise/models/authenticatable.rb', line 81

def valid_for_authentication?
  block_given? ? yield : true
end