Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (28 sloc) 0.775 kB
class Clearance::UsersController < ApplicationController
unloadable
skip_before_filter :authenticate, :only => [:new, :create]
before_filter :redirect_to_root, :only => [:new, :create], :if => :signed_in?
def new
@user = ::User.new(params[:user])
render :template => 'users/new'
end
def create
@user = ::User.new params[:user]
if @user.save
flash_notice_after_create
sign_in(@user)
redirect_to(url_after_create)
else
render :template => 'users/new'
end
end
private
def flash_notice_after_create
flash[:notice] = translate(:deliver_confirmation,
:scope => [:clearance, :controllers, :users],
:default => "You are now signed up.")
end
def url_after_create
sign_in_url
end
end
Jump to Line
Something went wrong with that request. Please try again.