Skip to content

Commit

Permalink
PR cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ivar committed Sep 10, 2018
1 parent 19a5e53 commit 56632e0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/interactors/send_update_emails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class SendUpdateEmails
def perform
require_in_context :order


send_update_to_suppliers order.sellers_with_changes
send_update_to_suppliers order.sellers_with_cancel
end
Expand Down Expand Up @@ -36,14 +37,12 @@ def users_should_be_updated_on_remove?
private

def send_update_to_suppliers(suppliers)
suppliers.each do |supplier|
if supplier.users.present?
suppliers.
find_all {|supplier| supplier.users.present? }.

This comment has been minimized.

Copy link
@rbarreca

rbarreca Sep 11, 2018

Contributor

Minor space nit. Not sure if preferred convention going forward is one space padding inside curly braces or none, but I think they should be symmetrical here one way or the other.

each do |supplier|
OrderMailer.
delay(priority: 10).
seller_order_updated(order, supplier)
else
Rollbar.warning("Warning: Trying to send update email (for order id ##{order.id}) to supplier (#{supplier.id} - #{supplier.name}) with 0 users")
end
end
end
end

0 comments on commit 56632e0

Please sign in to comment.