spree/spree — pull request #4697 by vishalzambre (2014-05-16 06:54:45+00:00)
Title: Promotion#activate returns true and if action is create line items

If Promotion#activate returns true and action is create line items, then we are not making any entry to adjustments for that order, Then in following code promo will always nil.
```ruby
promo = @order.adjustments.includes(:originator).promotion.detect { |p| p.originator.promotion.code == @order.coupon_code }
```
that's why it returns following message
```ruby
return { :coupon_applied? => false, :error => Spree.t(:coupon_code_not_found) }
```

I check this with spreecommerce live demo as well it is reproducible
steps
1) go to => https://monster-boutique-2583.spree.mx/products/ruby-on-rails-baseball-jersey
2) click add to cart
3) go to => https://monster-boutique-2583.spree.mx/cart
4) use coupon code => "promotest"
5) click update
6) then you will see "Ruby on Rails Stein" this product in cart but flash message is "The coupon code you entered doesn't exist. Please try again."