official_module/app/models/master_password.rb

15 lines
256 B
Ruby
Raw Normal View History

2021-07-15 09:08:06 +00:00
class MasterPassword
include Mongoid::Document
include Mongoid::Timestamps
include ActiveModel::SecurePassword
field :password_digest, type: String
has_secure_password
def changed_days_ago
((Time.now - self.updated_at) / 86400).to_i
end
end