Skip to content

Instantly share code, notes, and snippets.

@wewert
Created June 2, 2017 17:11
Show Gist options
  • Save wewert/9d3be15723e6aadd79a70d2d2df14fd4 to your computer and use it in GitHub Desktop.
Save wewert/9d3be15723e6aadd79a70d2d2df14fd4 to your computer and use it in GitHub Desktop.
Response to using a Callback
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