Module: Wicked::Controller::Concerns::Path

Extended by:
ActiveSupport::Concern
Included in:
Wizard
Defined in:
lib/wicked/controller/concerns/path.rb

Instance Method Summary collapse

Instance Method Details

#next_wizard_path(options = {}) ⇒ Object



5
6
7
# File 'lib/wicked/controller/concerns/path.rb', line 5

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

#previous_wizard_path(options = {}) ⇒ Object



9
10
11
# File 'lib/wicked/controller/concerns/path.rb', line 9

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

#wicked_actionObject



17
18
19
# File 'lib/wicked/controller/concerns/path.rb', line 17

def wicked_action
  params[:action]
end

#wicked_controllerObject



13
14
15
# File 'lib/wicked/controller/concerns/path.rb', line 13

def wicked_controller
  params[:controller]
end

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



22
23
24
25
26
27
28
29
30
# File 'lib/wicked/controller/concerns/path.rb', line 22

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
  url_for(options)
end