app/controllers/users_controller.rb
# Be sure to include AuthenticationSystem in Application Controller instead
Be sure to include AuthenticationSystem in Application Controller instead
Be sure to include AuthenticationSystem in Application Controller instead
def create
    cookies.delete :auth_token
    @user = User.new(params[:user])
    @user.register! if @user.valid?
    if @user.errors.empty?
      self.current_user = @user
      redirect_back_or_default('/')
      flash[:notice] = "Thanks for signing up!"
    else
      render :action => 'new'
    end
  end
def create cookies . delete :auth_token @user = User . new ( params [ :user ] ) @user . register! if @user . valid? if @user . errors . empty? self . current_user = @user redirect_back_or_default ( '/' ) flash [ :notice ] = "Thanks for signing up!" else render :action => 'new' end end
Be sure to include AuthenticationSystem in Application Controller instead
Be sure to include AuthenticationSystem in Application Controller instead
# protects against session fixation attacks, wreaks havoc with  # request forgery protection. # uncomment at your own risk # reset_session