Sha256: 544345c2e5e4451417a49be4775f695a7d926c6816d261f65e7091afc95d1fd4
Contents?: true
Size: 953 Bytes
Versions: 3
Compression:
Stored size: 953 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
wicked-1.3.4 | lib/wicked/wizard_controller.rb |
wicked-1.3.3 | lib/wicked/wizard_controller.rb |
wicked-1.3.2 | lib/wicked/wizard_controller.rb |