Sha256: ec7727286659a0f1d62fa08f7b9013b90c57cfe013b76b1d654fbaed3d27e95e

Contents?: true

Size: 952 Bytes

Versions: 2

Compression:

Stored size: 952 Bytes

Contents

# Please don't re-use any patterns found in this controller,
# they work, but are not very good practices.
# If you have a better way to do this, please let me know

class Wicked::WizardController < ApplicationController
  include Wicked::Wizard

  # def index
  #   # redirect_to_first_step
  # end

  # steps :confirm_password, :invite_fb

  # @example show action
  # def show
  #   case step
  #   when :confirm_password
  #     redirect_to_next(@next_step) and return nil unless @user.facebook?
  #   when :invite_fb
  #     redirect_to_next(@next_step) and return nil unless @user.facebook?
  #   end
  #   render_wizard
  # end


  # @example update action
  # def update
  #   case step
  #   when :confirm_password
  #     @user.update_attributes(params[:user])
  #   when :confirm_profile
  #     @user.update_attributes(params[:user])
  #   end
  #   sign_in(@user, :bypass => true) # needed for devise
  #   render_wizard @user
  # end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wicked-2.0.0 lib/wicked/wizard_controller.rb
wicked-1.4.0 lib/wicked/wizard_controller.rb