property_hire/app/models/property_hire_setting.rb

10 lines
225 B
Ruby
Raw Permalink Normal View History

class PropertyHireSetting
include Mongoid::Document
include Mongoid::Timestamps
field :auto_approve, type: Boolean, :default => false
def self.auto_approve_enabled?
2020-03-23 17:26:52 +00:00
self.first.auto_approve rescue false
end
end