Class: Wicked::Pipeline::BaseStepsController
- Inherits:
-
Object
- Object
- Wicked::Pipeline::BaseStepsController
- Includes:
- Wizard
- Defined in:
- app/controllers/wicked/pipeline/base_steps_controller.rb
Instance Attribute Summary collapse
-
#step_processor ⇒ Object
readonly
Returns the value of attribute step_processor.
Instance Method Summary collapse
Instance Attribute Details
#step_processor ⇒ Object (readonly)
Returns the value of attribute step_processor.
13 14 15 |
# File 'app/controllers/wicked/pipeline/base_steps_controller.rb', line 13 def step_processor @step_processor end |
Instance Method Details
#show ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/wicked/pipeline/base_steps_controller.rb', line 16 def show yield if block_given? _set_processor_required! if step == Wicked::FINISH_STEP && [steps.last][:valid] && [steps.last][:accessible] jump_to(steps.last) if [steps.last][:blocking] render_wizard(nil, {}, resource_url_params) elsif _accessible_steps.include?(step_processor.step_name) render_step(step_processor.step_name) else jump_to(_accessible_steps.last) render_wizard(nil, {}, resource_url_params) end end |
#update ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'app/controllers/wicked/pipeline/base_steps_controller.rb', line 32 def update params.require(:id) yield if block_given? _set_processor_required! unless step_processor.resource.new_record? render_wizard(step_processor, {}, resource_url_params) return end process_resource!(step_processor) if step_processor.saved? render_wizard(nil, {}, resource_url_params) else render_step(step_processor.step_name) end end |