Sha256: cff8e98a0840df3ba46c7421ac9b7fce646c1eca7e256667e1c3184122c92dfa
Contents?: true
Size: 547 Bytes
Versions: 18
Compression:
Stored size: 547 Bytes
Contents
# Extensions to help during seeding of ThecoreSettings module Thecore class Seed def self.save_setting ns, setting, value puts "Saving setting if nil #{ns}: #{setting} = #{value}" if ::Settings.ns(ns)[setting].blank? ::Settings.ns(ns)[setting] if value.blank? ::Settings.ns(ns)[setting] = value unless value.blank? end end def self.delete_setting ns, setting puts "Removing setting #{ns}: #{setting}" ThecoreSettings::Setting.where(ns: ns, key: setting).destroy_all end end end
Version data entries
18 entries across 18 versions & 1 rubygems