Skip to content

Commit

Permalink
Remove mass assignment of protected Template#locked attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic Cleal committed Dec 1, 2015
1 parent d344850 commit 793648e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/seeds.d/50-bootdisk_templates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
:template => content,
:default => true,
:vendor => "Foreman boot disk",
:locked => true
}
tmpl.locked = true
tmpl.save!(:validate => false) if tmpl.changes.present?

content = File.read(File.join(ForemanBootdisk::Engine.root, 'app', 'views', 'foreman_bootdisk', 'generic_host.erb'))
Expand All @@ -27,7 +27,7 @@
:template => content,
:default => true,
:vendor => "Foreman boot disk",
:locked => true
}
tmpl.locked = true
tmpl.save!(:validate => false) if tmpl.changes.present?
end

0 comments on commit 793648e

Please sign in to comment.