Author: Hugo Melo <hugo@riseup.net>
Merge branch 'master' of https://github.com/samasti/noosfero
plugins/orders/models/orders_plugin/sale.rb | 6 +++---
diff --git a/plugins/orders/models/orders_plugin/sale.rb b/plugins/orders/models/orders_plugin/sale.rb index f01cbf64ae258009220b04b89c508f1ff0d58757..980e683c534931ebe7c8aa9e1596bb7af4d3b2d7 100644 --- a/plugins/orders/models/orders_plugin/sale.rb +++ b/plugins/orders/models/orders_plugin/sale.rb @@ -43,11 +43,11 @@ # ignore when status is being rewinded return if (Statuses.index(self.status) <= Statuses.index(self.status_was) rescue false) if self.status == 'ordered' and not [nil, 'ordered'].include? self.status_was - OrdersPlugin::Mailer.sale_confirmation(self).deliver + OrdersPlugin::Mailer.sale_confirmation(self).deliver_later elsif self.status == 'cancelled' and self.status_was != 'cancelled' - OrdersPlugin::Mailer.sale_cancellation(self).deliver + OrdersPlugin::Mailer.sale_cancellation(self).deliver_later elsif self.status == 'received' and self.status_was != 'received' - OrdersPlugin::Mailer.sale_received(self).deliver + OrdersPlugin::Mailer.sale_received(self).deliver_later end end end