diff --git a/app/models/project_services/builds_email_service.rb b/app/models/project_services/builds_email_service.rb index b8bd48aca695a515f843761c375b6b17e8d2d371..8247c79fc336c0e8074e2ad3fb4b25f76f57f979 100644 --- a/app/models/project_services/builds_email_service.rb +++ b/app/models/project_services/builds_email_service.rb @@ -79,8 +79,7 @@ class BuildsEmailService < Service end def all_recipients(data) - all_recipients = [] - all_recipients <<= recipients.split(',') + all_recipients = recipients.split(',') if add_pusher? && data[:user][:email] all_recipients << "#{data[:user][:email]}" diff --git a/app/models/service.rb b/app/models/service.rb index 195c4690e8fcb01fa7a7f45a897431a5cd414a68..4159e367d8cff28f3627aad6edc23672cd98a315 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -143,10 +143,10 @@ class Service < ActiveRecord::Base args.each do |arg| class_eval %{ - def #{arg}? - ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES.include?(#{arg}) - end - } + def #{arg}? + ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES.include?(#{arg}) + end + } end end