property_hire/app/models/property_hire_setting.rb

10 lines
225 B
Ruby

class PropertyHireSetting
include Mongoid::Document
include Mongoid::Timestamps
field :auto_approve, type: Boolean, :default => false
def self.auto_approve_enabled?
self.first.auto_approve rescue false
end
end