changelog shortlog tags changeset manifest revisions annotate raw

app/controllers/users_controller.rb

changeset 5: 233c1cbacd12
child:ac1024130232
author: moriq@moriq.com
date: Wed Mar 05 01:21:23 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: generate authenticated.
1class UsersController < ApplicationController
2 # Be sure to include AuthenticationSystem in Application Controller instead
3 include AuthenticatedSystem
4
5
6 # render new.rhtml
7 def new
8 end
9
10 def create
11 cookies.delete :auth_token
12 # protects against session fixation attacks, wreaks havoc with
13 # request forgery protection.
14 # uncomment at your own risk
15 # reset_session
16 @user = User.new(params[:user])
17 @user.save
18 if @user.errors.empty?
19 self.current_user = @user
20 redirect_back_or_default('/')
21 flash[:notice] = "Thanks for signing up!"
22 else
23 render :action => 'new'
24 end
25 end
26
27end