Class: ShoppingCart::CheckoutController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ShoppingCart::CheckoutController
- Includes:
- Wicked::Wizard
- Defined in:
- app/controllers/shopping_cart/checkout_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/controllers/shopping_cart/checkout_controller.rb', line 11 def show @checkout_data = GetCheckoutData.call(@order, step) ValidateStep.call(@step, @order) do on(:ok) { render_wizard } on(:invalid) { redirect_to previous_wizard_path } end end |
#update ⇒ Object
19 20 21 22 23 24 25 |
# File 'app/controllers/shopping_cart/checkout_controller.rb', line 19 def update ProceedCheckout.call(params, @order, step) do on(:ok) { render_wizard @order } on(:invalid) { redirect_to root_path } on(:validation) { render_wizard } end end |