Sha256: 4cbe4bbd13b827de7e74dc8d576d431607de550f3d1e6fa0c74062f387ef569e

Contents?: true

Size: 595 Bytes

Versions: 3

Compression:

Stored size: 595 Bytes

Contents

module Wicked
  module Wizard
    extend ActiveSupport::Concern

    # Include the modules!!
    include Wicked::Controller::Concerns::Path
    include Wicked::Controller::Concerns::RenderRedirect
    include Wicked::Controller::Concerns::Steps

    included do
      # Give our Views helper methods!
      helper_method :wizard_path, :next_wizard_path
      # Set @step and @next_step variables
      before_filter :setup_wizard
    end

    private
    def setup_wizard
      @step      = params[:id].try(:to_sym) || steps.first
      @next_step = next_step(@step)
    end
    public
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
wicked-with-previous-support-0.1 lib/wicked/wizard.rb
wicked-0.1.2 lib/wicked/wizard.rb
wicked-0.1.1 lib/wicked/wizard.rb