spree/spree — pull request #4685 by vishalzambre (2014-05-14 10:26:54+00:00)
Title: Coupon applicator changes

if promotion having coupon code and action is create line item, then after perform action
```ruby
promotion.activate(:coupon_code => @order.coupon_code, :order => @order)
```
we are not making any entry to adjustments for that order.
then in following code promo will always nil but that promotion is applies if eligible.
```ruby
promo = @order.adjustments.includes(:originator).promotion.detect { |p| p.originator.promotion.code == @order.coupon_code }
```
then it returns 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 with flash message "The coupon code you entered doesn't exist. Please try again."

![screen shot 2014-05-14 at 3 56 39 pm](https://cloud.githubusercontent.com/assets/2970724/2969814/14592e2e-db52-11e3-8cab-2abfba48404e.png)

promotion screens

![screen shot 2014-05-14 at 3 57 38 pm](https://cloud.githubusercontent.com/assets/2970724/2969822/3c457500-db52-11e3-9ffd-c53ac2654007.png)
![screen shot 2014-05-14 at 3 57 47 pm](https://cloud.githubusercontent.com/assets/2970724/2969824/3f86a798-db52-11e3-9f5e-118e71e1a193.png)