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