Sha256: 9f54b1273accc4f5e6a1e282cb9a55c4f4fd92595150355be8c792a278cf418a

Contents?: true

Size: 709 Bytes

Versions: 5

Compression:

Stored size: 709 Bytes

Contents

# frozen_string_literal: true

module SharedAdmin
  extend ActiveSupport::Concern

  included do
    devise :database_authenticatable, :registerable,
           :timeoutable, :recoverable, :lockable, :confirmable,
           unlock_strategy: :time, lock_strategy: :none,
           allow_unconfirmed_access_for: 2.weeks, reconfirmable: true

    validates_length_of     :reset_password_token, minimum: 3, allow_blank: true
    if Devise::Test.rails51?
      validates_uniqueness_of :email, allow_blank: true, if: :will_save_change_to_email?
    else
      validates_uniqueness_of :email, allow_blank: true, if: :email_changed?
    end
  end

  def raw_confirmation_token
    @raw_confirmation_token
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
devise-4.5.0 test/rails_app/lib/shared_admin.rb
devise-4.4.3 test/rails_app/lib/shared_admin.rb
devise-4.4.2 test/rails_app/lib/shared_admin.rb
devise-4.4.1 test/rails_app/lib/shared_admin.rb
devise-4.4.0 test/rails_app/lib/shared_admin.rb