Sha256: faec70c40094aa04ea967f957f36697ca349183933c4cfcdcf8674a0652f6276

Contents?: true

Size: 642 Bytes

Versions: 10

Compression:

Stored size: 642 Bytes

Contents

module Wicked::Controller::Concerns::Path
  extend ActiveSupport::Concern


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

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

  def wicked_controller
    params[:controller]
  end

  def wicked_action
    params[:action]
  end


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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
wicked-0.5.0 lib/wicked/controller/concerns/path.rb
wicked-0.4.0 lib/wicked/controller/concerns/path.rb
wicked-0.3.4 lib/wicked/controller/concerns/path.rb
wicked-0.3.3 lib/wicked/controller/concerns/path.rb
wicked-0.3.2 lib/wicked/controller/concerns/path.rb
wicked-0.3.1 lib/wicked/controller/concerns/path.rb
wicked-0.3.0 lib/wicked/controller/concerns/path.rb
wicked-0.2.0 lib/wicked/controller/concerns/path.rb
wicked-0.1.6 lib/wicked/controller/concerns/path.rb
wicked-0.1.6.pre lib/wicked/controller/concerns/path.rb