Module: Wizard::Controller::Concerns::Paths

Extended by:
ActiveSupport::Concern
Included in:
Wizard::Controller
Defined in:
lib/wizard/controller/concerns/paths.rb

Instance Method Summary collapse

Instance Method Details

#next_wizard_path(options = {}) ⇒ Object



12
13
14
# File 'lib/wizard/controller/concerns/paths.rb', line 12

def next_wizard_path(options = {})
  wizard_path(@next_step, options)
end

#previous_wizard_path(options = {}) ⇒ Object



16
17
18
# File 'lib/wizard/controller/concerns/paths.rb', line 16

def previous_wizard_path(options = {})
  wizard_path(@previous_step, options)
end

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



20
21
22
23
24
25
26
27
# File 'lib/wizard/controller/concerns/paths.rb', line 20

def wizard_path(goto_step = nil, options = {})
  url_for(
    { 
      controller: controller_name, action: goto_step,
      id: params[:id], only_path: true
    }.merge options
  )
end