Sha256: 42156d0b958c55a9e769ae4cbdbcfbfc29212ecc096f2d0afcf855b55058eddd

Contents?: true

Size: 464 Bytes

Versions: 4

Compression:

Stored size: 464 Bytes

Contents

class CreateHostBootdiskTemplate < ActiveRecord::Migration
  def self.up
    ConfigTemplate.find_or_create_by_name(
      :name => 'Boot disk gPXE - host',
      :template_kind_id => TemplateKind.find_by_name('gPXE').try(:id),
      :snippet => false,
      :template => File.read(File.join(Bootdisk::Engine.root, 'app', 'views', 'bootdisk', 'host_v1.erb'))
    )
  end
  
  def self.down
    ConfigTemplate.destroy_all(:name => 'Boot disk gPXE - host')
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_bootdisk-1.2.3 db/migrate/20130914211030_create_host_bootdisk_template.rb
foreman_bootdisk-1.2.2 db/migrate/20130914211030_create_host_bootdisk_template.rb
foreman_bootdisk-1.2.1 db/migrate/20130914211030_create_host_bootdisk_template.rb
foreman_bootdisk-1.2.0 db/migrate/20130914211030_create_host_bootdisk_template.rb