Closed marlena-b closed 2 months ago
Name | Link |
---|---|
Latest commit | 844d11048566c276b41dcd9d84372d778cdfbabf |
Latest deploy log | https://app.netlify.com/sites/ecommerce-events/deploys/66d4caad49c8960008bd4295 |
There are many changes in this pull request which I would like to debate separately, but as a whole I think it's ready to be merged.
Issue: https://github.com/RailsEventStore/ecommerce/issues/375
Before when a product was added to an order and subsequently went out of stock before submission, the system incorrectly showed a success message "Your order is being submitted" while leaving the order in draft status. Now it shows "Order can not be submitted! Product not available in requested quantity!".
There are a lot of changes. I will try to explain all of them in the comments below.
The implementation for the Result object was taken from this presentation: https://www.icloud.com/keynote/0x2bfAdGek3Eg-I_2kIomD-6g#Controller_refactoring (it lacks notes but you can check slides 7 and 17 for "before" and "after")