Sha256: 5421d3389ed32bdaea30dda02a35bf81f08e0676bd05a3aa153045d70479eb8f
Contents?: true
Size: 407 Bytes
Versions: 7
Compression:
Stored size: 407 Bytes
Contents
module LockableFields extend ::ActiveSupport::Concern included do include Mongoid::Document field :failed_attempts, type: Integer, default: 0 # Only if lock strategy is :failed_attempts field :unlock_token, type: String # Only if unlock strategy is :email or :both field :locked_at, type: Time include Mongoid::Timestamps index({ unlock_token: 1 }, { unique: true }) end end
Version data entries
7 entries across 7 versions & 1 rubygems