app/controllers/comable/orders_controller.rb in comable_frontend-0.3.2 vs app/controllers/comable/orders_controller.rb in comable_frontend-0.3.3

- old
+ new

@@ -37,10 +37,15 @@ end private def send_order_complete_mail - Comable::OrderMailer.complete(@order).deliver if current_store.email_activate? + return unless current_store.email_activate? + if Rails.version =~ /^4.2./ + Comable::OrderMailer.complete(@order).deliver_now + else + Comable::OrderMailer.complete(@order).deliver + end end def ensure_cart_not_empty return if current_customer.cart.any? flash[:alert] = Comable.t('carts.empty')