Class: RegistrationsController

Inherits:
Devise::RegistrationsController
  • Object
show all
Defined in:
app/controllers/registrations_controller.rb

Overview

Copyright © 2010-2011, Diaspora Inc. This file is

licensed under the Affero General Public License version 3 or later.  See
the COPYRIGHT file.

Instance Method Summary collapse

Instance Method Details

#createObject


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'app/controllers/registrations_controller.rb', line 11

def create
  @user = User.build(user_params)
  @user.process_invite_acceptence(invite) if invite.present?

  if @user.
    flash[:notice] = I18n.t 'registrations.create.success'
    @user.seed_aspects
    (:user, @user)
    Rails.logger.info("event=registration status=successful user=#{@user.diaspora_handle}")
  else
    @user.errors.delete(:person)

    flash[:error] = @user.errors.full_messages.join(" - ")
    Rails.logger.info("event=registration status=failure errors='#{@user.errors.full_messages.join(', ')}'")
    render :action => 'new', :layout => 'with_header'
  end
end

#newObject


29
30
31
# File 'app/controllers/registrations_controller.rb', line 29

def new
  super
end