Class: Setting::Mco

Inherits:
Setting
  • Object
show all
Defined in:
app/models/setting/mco.rb

Class Method Summary collapse

Class Method Details

.load_defaultsObject



4
5
6
7
8
9
10
11
12
13
14
# File 'app/models/setting/mco.rb', line 4

def self.load_defaults
  return unless ActiveRecord::Base.connection.table_exists?('settings')
  return unless super

  Setting.transaction do
    [
      self.set('use_mco', "Use MCO to execute remote commands", false),
    ].compact.each { |s| self.create s.update(:category => "Setting::Mco") }
  end
  true
end