Module: Clearance::App::Controllers::UsersController::Actions

Defined in:
lib/clearance/app/controllers/users_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/clearance/app/controllers/users_controller.rb', line 21

def create
  @user = User.new params[:user]
  if @user.save
    ClearanceMailer.deliver_confirmation @user
    flash[:notice] = "You will receive an email within the next few minutes. " <<
                     "It contains instructions for confirming your account."
    redirect_to url_after_create
  else
    render :action => "new"
  end
end

#newObject



17
18
19
# File 'lib/clearance/app/controllers/users_controller.rb', line 17

def new
  @user = User.new(params[:user])
end