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


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

def create
  @user = User.build(user_params)

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

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

#registrations_closedObject


31
32
33
# File 'app/controllers/registrations_controller.rb', line 31

def registrations_closed
  render "registrations/registrations_closed"
end