Sha256: 92226e728aad232079b7e73f52b357b6d908170da3ec6edfe16e2b258fdde599

Contents?: true

Size: 830 Bytes

Versions: 6

Compression:

Stored size: 830 Bytes

Contents

class Clearance::UsersController < ApplicationController
  unloadable

  before_filter :redirect_to_root, :only => [:new, :create], :if => :signed_in?
  filter_parameter_logging :password

  def new
    @user = ::User.new(params[:user])
    render :template => 'users/new'
  end

  def create
    @user = ::User.new params[:user]
    if @user.save
      ::ClearanceMailer.deliver_confirmation @user
      flash[:notice] = translate(:deliver_confirmation,
        :scope   => [:clearance, :controllers, :users],
        :default => "You will receive an email within the next few minutes. " <<
                    "It contains instructions for confirming your account.")
      redirect_to url_after_create
    else
      render :template => 'users/new'
    end
  end

  private

  def url_after_create
    new_session_url
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
activerain-clearance-0.6.6 app/controllers/clearance/users_controller.rb
activerain-clearance-0.6.6001 app/controllers/clearance/users_controller.rb
activerain-clearance-0.6.6002 app/controllers/clearance/users_controller.rb
hui-clearance-0.6.6 app/controllers/clearance/users_controller.rb
thoughtbot-clearance-0.6.5 app/controllers/clearance/users_controller.rb
thoughtbot-clearance-0.6.6 app/controllers/clearance/users_controller.rb