diff --git a/app/models/custom_button.rb b/app/models/custom_button.rb index ad87c8b2191e..e8bf0fa54bb9 100644 --- a/app/models/custom_button.rb +++ b/app/models/custom_button.rb @@ -96,7 +96,7 @@ def invoke(target, source = nil) end def publish_event(source, target, args) - target.kind_of?(Array) ? target.each { |t| create_event(source, t, args) } : create_event(source, target, args) + target.size > 1 ? target.each { |t| create_event(source, t, args) } : create_event(source, target, args) end def create_event(source, target, args)