Skip to content

Instantly share code, notes, and snippets.

@Bartuz
Last active December 2, 2015 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Bartuz/0864dd0fc6c3ec7c5c5e to your computer and use it in GitHub Desktop.
Save Bartuz/0864dd0fc6c3ec7c5c5e to your computer and use it in GitHub Desktop.
# 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