Sha256: 9f51dfd95af4118f941ca447b9e904b7b0fe59b4d5c961298f5b87c140013c8f

Contents?: true

Size: 495 Bytes

Versions: 4

Compression:

Stored size: 495 Bytes

Contents

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_bootdisk-1.2.3 db/migrate/20130915201457_create_generic_host_bootdisk_template.rb
foreman_bootdisk-1.2.2 db/migrate/20130915201457_create_generic_host_bootdisk_template.rb
foreman_bootdisk-1.2.1 db/migrate/20130915201457_create_generic_host_bootdisk_template.rb
foreman_bootdisk-1.2.0 db/migrate/20130915201457_create_generic_host_bootdisk_template.rb