Module: Effective::WizardController::WickedOverrides

Included in:
Effective::WizardController
Defined in:
app/controllers/concerns/effective/wizard_controller/wicked_overrides.rb

Instance Method Summary collapse

Instance Method Details

#wizard_path(goto_step = nil, options = {}) ⇒ Object



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, options = {})
  options = options.respond_to?(:to_h) ? options.to_h : options
  options = { :controller => wicked_controller,
              :action     => 'show',
              :id         => goto_step || params[:id],
              :only_path  => true
             }.merge(options)

  merged_url_options = options.reverse_merge!(url_options)
  effective_resource.url_helpers.url_for(merged_url_options)
end