Module: Authenticateable

Extended by:
ActiveSupport::Concern
Defined in:
lib/generators/authentication/templates/models/concerns/authenticateable.rb

Overview

Model concern to provide shared behaviour for authenticating records.

Automatically generated by the orthodox gem (https://github.com/bodacious/orthodox)

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

MINIMUM_PASSWORD_LENGTH =
6
MAXIMUM_PASSWORD_LENGTH =
128

Instance Method Summary collapse

Instance Method Details

#validate_presence_of_password?Boolean (private)

Returns:

  • (Boolean)


30
31
32
# File 'lib/generators/authentication/templates/models/concerns/authenticateable.rb', line 30

def validate_presence_of_password?
  new_record? || changes.include?("password")
end