Last active
December 2, 2015 15:44
-
-
Save Bartuz/0864dd0fc6c3ec7c5c5e to your computer and use it in GitHub Desktop.
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
# https://www.agileplannerapp.com/blog/building-agile-planner/refactoring-with-hexagonal-rails | |
def checkout | |
cart = CartCheckout.new(many, params) | |
if cart.save | |
redirect_to cart_path, notice: t('.success') | |
else | |
redirect_to cart_path, notice: t('.failure', reason: cart.error_message) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment