Sha256: 7f4b4584fd7a5b1a31ecf7d70f2b7d856532c508caf85c9441dbdf012c81079f
Contents?: true
Size: 820 Bytes
Versions: 2
Compression:
Stored size: 820 Bytes
Contents
def format_errors(model = nil) return '(nil found)' if model.nil? model.errors.full_messages.join(';') end kind = TemplateKind.find_or_create_by_name('Bootdisk') ConfigTemplate.without_auditing do content = File.read(File.join(Bootdisk::Engine.root, 'app', 'views', 'bootdisk', 'host.erb')) ConfigTemplate.find_or_create_by_name( :name => 'Boot disk iPXE - host', :template_kind_id => kind.id, :snippet => false, :template => content ).update_attribute(:template, content) content = File.read(File.join(Bootdisk::Engine.root, 'app', 'views', 'bootdisk', 'generic_host.erb')) ConfigTemplate.find_or_create_by_name( :name => 'Boot disk iPXE - generic host', :template_kind_id => kind.id, :snippet => false, :template => content ).update_attribute(:template, content) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
foreman_bootdisk-2.0.8 | db/seeds.rb |
foreman_bootdisk-2.0.7 | db/seeds.rb |