Sha256: 9d65d3960961f3447c39d231545ee7f175d39993ab3029d230bb52ed3d60f3f0

Contents?: true

Size: 709 Bytes

Versions: 4

Compression:

Stored size: 709 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 = 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
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wicked-1.3.4 lib/wicked/controller/concerns/path.rb
wicked-1.3.3 lib/wicked/controller/concerns/path.rb
wicked-1.3.2 lib/wicked/controller/concerns/path.rb
wicked-1.3.1 lib/wicked/controller/concerns/path.rb