Module: WizardSteps
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/wizard_steps.rb,
lib/wizard_steps/base.rb,
lib/wizard_steps/step.rb,
lib/wizard_steps/store.rb,
lib/wizard_steps/version.rb
Defined Under Namespace
Classes: Base, Step, Store, UnknownStep
Constant Summary
collapse
- VERSION =
"0.1.4"
Instance Method Summary
collapse
Instance Method Details
#completed ⇒ Object
32
|
# File 'lib/wizard_steps.rb', line 32
def completed; end
|
#index ⇒ Object
12
13
14
|
# File 'lib/wizard_steps.rb', line 12
def index
redirect_to step_path(wizard_class.first_key)
end
|
#show ⇒ Object
16
|
# File 'lib/wizard_steps.rb', line 16
def show; end
|
#update ⇒ Object
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/wizard_steps.rb', line 18
def update
current_step.assign_attributes step_params
if current_step.save!
if wizard.complete?
wizard.complete! { |result| on_complete(result) }
else
redirect_to(next_step_path)
end
else
render :show
end
end
|