File: admin.rb

package info (click to toggle)
ruby-devise-token-authenticatable 0.5.2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 276 kB
  • sloc: ruby: 1,059; makefile: 2
file content (9 lines) | stat: -rw-r--r-- 447 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
class Admin < ActiveRecord::Base
  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
  validates_uniqueness_of :email,                 allow_blank: true, if: :email_changed?
end