Class: Cartify::CheckoutController

Inherits:
ApplicationController show all
Includes:
Showable, Updatable, Wicked::Wizard
Defined in:
app/controllers/cartify/checkout_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



12
13
14
15
16
# File 'app/controllers/cartify/checkout_controller.rb', line 12

def show
  return redirect_to main_app.send(Cartify.empty_cart_path) if no_items_in_cart?
  send("show_#{step}") unless step == 'wicked_finish'
  render_wizard
end

#updateObject



18
19
20
21
# File 'app/controllers/cartify/checkout_controller.rb', line 18

def update
  send("update_#{step}")
  redirect_to next_wizard_path unless performed?
end