Created
June 2, 2017 17:11
-
-
Save wewert/9d3be15723e6aadd79a70d2d2df14fd4 to your computer and use it in GitHub Desktop.
Response to using a Callback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario: Need to take 10% off of order over $100 from next purchase from a current customer's online order. The callback was used to save last order if it met requirements(last order date and >$100). If current customer makes a new(next) order, the 10% would be applied. The callback is used to simplify the process. Also, I left comment in the controller that a callback was used right under the .save method. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment