module PasswordReusePolicy::AR::ClassMethods
Public Instance Methods
register!()
click to toggle source
# 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