Sha256: 03449fa383e61f43a36f972f7a9d87750d8f63d9c43e0be46f6ea154a58c6449

Contents?: true

Size: 615 Bytes

Versions: 7

Compression:

Stored size: 615 Bytes

Contents

## This controller uses includes

class JumpController < ApplicationController
  include Wicked::Wizard
  steps :first, :second, :last_step

  def show
    skip_step(skip_step_options) if params[:skip_step]
    jump_to :last_step, skip_step_options if params[:jump_to]
    if params[:resource]
      value = params[:resource][:save] == 'true'
      @bar  = Bar.new(value)
      render_wizard(@bar)
    else
      render_wizard
    end
  end

  def update
  end

  private

  def skip_step_options
    options = params[:skip_step_options]
    options.permit! if options.respond_to? :permitted?
    options
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wicked-2.0.0 test/dummy/app/controllers/jump_controller.rb
wicked-1.4.0 test/dummy/app/controllers/jump_controller.rb
wicked-1.3.4 test/dummy/app/controllers/jump_controller.rb
wicked-1.3.3 test/dummy/app/controllers/jump_controller.rb
wicked-1.3.2 test/dummy/app/controllers/jump_controller.rb
wicked-1.3.1 test/dummy/app/controllers/jump_controller.rb
wicked-1.3.0 test/dummy/app/controllers/jump_controller.rb