Module: PasswordReusePolicy::AR::ClassMethods
- Defined in:
- lib/password_reuse_policy/ar.rb
Instance Method Summary collapse
Instance Method Details
#register! ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/password_reuse_policy/ar.rb', line 3 def register! raise PasswordReusePolicy::ActiveRecodNotFoundError, "Could not find actve record" unless defined? ActiveRecord raise PasswordReusePolicy::ActiveRecodNotInherited, "Please inherit from active record class" unless ancestors.include? ActiveRecord::Base serialize :last_used_passwords, Hash before_save :set_last_used_passwords, :if => :password_present? end |