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

#actionObject



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

def action
  params[:action]
end

#controllerObject



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

def controller
  params[:controller]
end

#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(@step), options)
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 = {
               :controller => controller,
               :action     => 'show',
               :id         => goto_step || params[:id],
               :only_path  => true
             }.merge options
  url_for(options)
end