summaryrefslogtreecommitdiff
path: root/lib/chef/dsl
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-03-31 12:24:00 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-03-31 14:09:07 -0700
commit1b0cc1b541a9015fc925fc5d1ada6f85934fc0c7 (patch)
tree8a6f2b2c99faa926c705216a47fb0d1f94cd1cf0 /lib/chef/dsl
parent5dacd74ce5cccc4dbb651a45f9e591dd1921cc6e (diff)
downloadchef-1b0cc1b541a9015fc925fc5d1ada6f85934fc0c7.tar.gz
Chef-13: fix notifying array resources
this also deprecates the multi-resource notification syntax where `foo[a,b]` would attempt to notify both `foo[a]` and `foo[b]` because that is hella ambiguous. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/dsl')
-rw-r--r--lib/chef/dsl/declare_resource.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/dsl/declare_resource.rb b/lib/chef/dsl/declare_resource.rb
index ac3776c92f..6869e77eca 100644
--- a/lib/chef/dsl/declare_resource.rb
+++ b/lib/chef/dsl/declare_resource.rb
@@ -241,7 +241,7 @@ class Chef
resource = build_resource(type, name, created_at: created_at, &resource_attrs_block)
- run_context.resource_collection.insert(resource, resource_type: type, instance_name: name)
+ run_context.resource_collection.insert(resource, resource_type: resource.declared_type, instance_name: resource.name)
resource
end