Skip to content

Commit

Permalink
Use size rather than a check that fails for ActiveRecord::Relation
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-u committed Oct 4, 2018
1 parent d901dcb commit 405c88d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/custom_button.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 405c88d

Please sign in to comment.