Revision 611c27df
Added by Ohad Levy almost 12 years ago
- ID 611c27df7cd1fffe3badd52804ff5f2ff6b60a48
db/migrate/20101213085232_add_grubby_template.rb | ||
---|---|---|
class AddGrubbyTemplate < ActiveRecord::Migration
|
||
def self.up
|
||
ConfigTemplate.create(
|
||
ConfigTemplate.without_auditing { 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"))
|
||
:template => File.read("#{Rails.root}/app/views/unattended/grubby.erb"))}
|
||
end
|
||
|
||
def self.down
|
Also available in: Unified diff
fixes #1687 ensure that audit errors do not break db migrations