Sha256: e689836fc048fd4f4ab72043ecd7094778c377c1994c46ee9e80ce8df545a212

Contents?: true

Size: 500 Bytes

Versions: 5

Compression:

Stored size: 500 Bytes

Contents

class AddGrubbyTemplate < ActiveRecord::Migration
  class ConfigTemplate < ActiveRecord::Base
    has_and_belongs_to_many :operatingsystems
  end
  def self.up
        ConfigTemplate.create(
          :name                => "Grubby Default",
          :template_kind_id    => TemplateKind.find_by_name("script").id,
          :operatingsystem_ids => Redhat.all.map(&:id),
          :template            => File.read("#{Rails.root}/app/views/unattended/grubby.erb"))
  end

  def self.down
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/db/migrate/20101213085232_add_grubby_template.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/db/migrate/20101213085232_add_grubby_template.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/db/migrate/20101213085232_add_grubby_template.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/db/migrate/20101213085232_add_grubby_template.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/db/migrate/20101213085232_add_grubby_template.rb