summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordmitrys <dmitrys@northernlight.com>2017-10-23 12:28:28 -0400
committerdmitrys <dmitrys@northernlight.com>2017-10-23 12:28:28 -0400
commite86b8e83ba571b84307a5f04e1eb64703eb523f2 (patch)
tree5d92689db615aebb2be19208e4fd0cf5012f29a9
parentd646ef03f32874a150a09603ca09ef59abcf13f6 (diff)
downloadchef-e86b8e83ba571b84307a5f04e1eb64703eb523f2.tar.gz
Action is converted to symbol if possible
Signed-off-by: dmitrys <dmitrys@northernlight.com>
-rw-r--r--lib/chef/resource/resource_notification.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/resource/resource_notification.rb b/lib/chef/resource/resource_notification.rb
index ee90064a17..2786e4c39b 100644
--- a/lib/chef/resource/resource_notification.rb
+++ b/lib/chef/resource/resource_notification.rb
@@ -26,7 +26,11 @@ class Chef
def initialize(resource, action, notifying_resource)
@resource = resource
- @action = action
+ @action = if action.respond_to?(:to_sym)
+ action.to_sym
+ else
+ action
+ end
@notifying_resource = notifying_resource
end