Sha256: e38258c4b05543f7ecad71cabbdcea05b1b361f27b4cc88766c7c57e7676d197
Contents?: true
Size: 864 Bytes
Versions: 8
Compression:
Stored size: 864 Bytes
Contents
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 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 will receive an email within the next few minutes. " << "It contains instructions for confirming your account.") end def url_after_create sign_in_url end end
Version data entries
8 entries across 8 versions & 2 rubygems