Module: Effective::WizardController::WickedOverrides
- Included in:
- Effective::WizardController
- Defined in:
- app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb
Instance Method Summary collapse
-
#render_step(the_step, options = {}, params = {}) ⇒ Object
Override from wicked to support a fallback wizard step template.
-
#wizard_path(goto_step = nil, options = {}) ⇒ Object
Changes made here to work inside an effective rails engine.
Instance Method Details
#render_step(the_step, options = {}, params = {}) ⇒ Object
Override from wicked to support a fallback wizard step template
22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb', line 22 def render_step(the_step, = {}, params = {}) if the_step.nil? || the_step.to_s == Wicked::FINISH_STEP redirect_to_finish_wizard(, params) elsif lookup_context.exists?(the_step.to_s, lookup_context.prefixes) render(the_step, ) else render('effective/acts_as_wizard/wizard_step', ) end end |
#wizard_path(goto_step = nil, options = {}) ⇒ Object
Changes made here to work inside an effective rails engine
github.com/zombocom/wicked/blob/main/lib/wicked/controller/concerns/path.rb github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/routing/url_for.rb#L180
9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb', line 9 def wizard_path(goto_step = nil, = {}) = .respond_to?(:to_h) ? .to_h : = { :controller => wicked_controller, :action => 'show', :id => goto_step || params[:id], :only_path => true }.merge() = .reverse_merge!() effective_resource.url_helpers.url_for() end |