summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/parser/resource.rb6
-rw-r--r--lib/puppet/rails/resource.rb3
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb
index 0722f388c..56b430b7f 100644
--- a/lib/puppet/parser/resource.rb
+++ b/lib/puppet/parser/resource.rb
@@ -207,9 +207,9 @@ class Puppet::Parser::Resource
db_resource.ar_hash_merge(db_resource.get_tag_hash(),
updated_tags,
:create => Proc.new { |name, tag|
- db_resource.add_resource_tag(tag)
- }, :delete => Proc.new { |rt|
- rt.each { |tag| db_resource.resource_tags.delete(tag) }
+ db_resource.add_resource_tag(name)
+ }, :delete => Proc.new { |tag|
+ db_resource.resource_tags.delete(tag)
}, :modify => Proc.new { |db, mem|
# nothing here
})
diff --git a/lib/puppet/rails/resource.rb b/lib/puppet/rails/resource.rb
index 0163394b1..233982ed9 100644
--- a/lib/puppet/rails/resource.rb
+++ b/lib/puppet/rails/resource.rb
@@ -45,7 +45,8 @@ class Puppet::Rails::Resource < ActiveRecord::Base
def get_tag_hash(tags = nil)
tags ||= resource_tags.find(:all, :include => :puppet_tag)
return tags.inject({}) do |hash, tag|
- hash[tag.puppet_tag.name] = tag.puppet_tag.name
+ # We have to store the tag object, not just the tag name.
+ hash[tag.puppet_tag.name] = tag
hash
end
end