Module: Authenticate::Modules

Extended by:
ActiveSupport::Concern
Defined in:
lib/authenticate/modules.rb

Overview

Modules injects Authenticate modules into the app User model.

Any module being loaded into User can optionally define a class method ‘required_fields(klass)` defining any required attributes in the User model. For example, the :username module declares:

module Username
  extend ActiveSupport::Concern

  def self.required_fields(klass)
    [:username]
  end
  ...

If the model class is missing a required field, Authenticate will fail with a MissingAttribute error. The error will declare what required fields are missing.

Defined Under Namespace

Modules: ClassMethods Classes: MissingAttribute