Class: Stall::Checkout::StepsController
Instance Method Summary
collapse
#set_stall_layout
#available_shipping_methods_for, #step_path
Instance Method Details
#change ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'app/controllers/stall/checkout/steps_controller.rb', line 26
def change
target_step = params[:step]
if @wizard.step_complete?(target_step)
@wizard.move_to_step!(target_step)
redirect_to step_path
else
@step.prepare
flash[:error] ||= t("stall.checkout.#{ target_step }.error")
render 'show'
end
end
|
#show ⇒ Object
9
10
11
|
# File 'app/controllers/stall/checkout/steps_controller.rb', line 9
def show
@step.prepare
end
|
#update ⇒ Object
Also known as:
foreign_update
13
14
15
16
17
18
19
20
21
22
|
# File 'app/controllers/stall/checkout/steps_controller.rb', line 13
def update
if @step.process
@wizard.validate_current_step!
redirect_to step_path
else
@step.prepare
flash[:error] ||= t("stall.checkout.#{ @wizard.current_step_name }.error")
render 'show'
end
end
|