Module: Repim::Signup

Defined in:
lib/repim/signup.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
# File 'lib/repim/signup.rb', line 3

def self.included(base)
  base.before_filter :authenticate, :except => [:create]
end

Instance Method Details

#createObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/repim/signup.rb', line 7

def create
  @user = User.new(params[:user])
  @user.identity_url = session[:identity_url]

  respond_to do |format|
    if @user.save
      flash[:notice] = 'User was successfully created.'
      reset_session
      self.current_user = @user
      format.html { redirect_to(after_create_url(@user)) }
    else
      format.html { render :action => "new" }
    end
  end
end