Sha256: 8e55030920694f4cfddd9be8e200701a8135eb3f2c83cd5f45b58cd4bf81bbb6

Contents?: true

Size: 647 Bytes

Versions: 2

Compression:

Stored size: 647 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(@step), options)
  end

  def controller
    params[:controller]
  end

  def action
    params[:action]
  end


  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
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wicked-with-previous-support-0.2 lib/wicked/controller/concerns/path.rb
wicked-with-previous-support-0.1 lib/wicked/controller/concerns/path.rb