Application_Form/app/models/application_form_setting.rb

13 lines
338 B
Ruby

class ApplicationFormSetting
include Mongoid::Document
include Mongoid::Timestamps
field :reviewer_length, default: 3, :type=> Integer
field :last_serial_number, :type => Integer, :default => 0
field :last_ticket_key, type: Integer, default: 0
def self.get_one
s = self.first
s = self.create if s.nil?
s
end
end