Sha256: 9d35b3ba062cde2140e4fb53df2181dfc5cb5b0212937e30509197c8aa96fc05

Contents?: true

Size: 947 Bytes

Versions: 28

Compression:

Stored size: 947 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
  # end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
wicked-1.3.1 lib/wicked/wizard_controller.rb
wicked-1.3.0 lib/wicked/wizard_controller.rb
wicked-1.2.1 lib/wicked/wizard_controller.rb
wicked-1.1.1 app/controllers/wicked/wizard_controller.rb
wicked-1.1.0 app/controllers/wicked/wizard_controller.rb
wicked-1.0.3 app/controllers/wicked/wizard_controller.rb
wicked-1.0.2 app/controllers/wicked/wizard_controller.rb
wicked-1.0.1 app/controllers/wicked/wizard_controller.rb
wicked-1.0.0 app/controllers/wicked/wizard_controller.rb
wicked-0.6.1 app/controllers/wicked/wizard_controller.rb
wicked-0.6.0 app/controllers/wicked/wizard_controller.rb
wicked-0.5.0 app/controllers/wicked/wizard_controller.rb
wicked-0.4.0 app/controllers/wicked/wizard_controller.rb
wicked-0.3.4 app/controllers/wicked/wizard_controller.rb
wicked-0.3.3 app/controllers/wicked/wizard_controller.rb
wicked-0.3.2 app/controllers/wicked/wizard_controller.rb
wicked-0.3.1 app/controllers/wicked/wizard_controller.rb
wicked-0.3.0 app/controllers/wicked/wizard_controller.rb
wicked-0.2.0 app/controllers/wicked/wizard_controller.rb
wicked-0.1.6 app/controllers/wicked/wizard_controller.rb