From 730c399b7100ce0818a57c649bd69a96c920bfd1 Mon Sep 17 00:00:00 2001 From: Okechi Onyeje Date: Thu, 30 Mar 2017 12:32:36 -0400 Subject: [PATCH] adding a tab character --- .../app/controllers/registrations_controller.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Pearlception/app/controllers/registrations_controller.rb b/Pearlception/app/controllers/registrations_controller.rb index 51ca8db..3b8ced9 100644 --- a/Pearlception/app/controllers/registrations_controller.rb +++ b/Pearlception/app/controllers/registrations_controller.rb @@ -37,12 +37,12 @@ class RegistrationsController < Devise::RegistrationsController redirect_to '/' else @user.save - begin - sign_in @user - rescue - flash[:error] = "Email already in use" - redirect_to '/signin' and return - end + begin + sign_in @user + rescue + flash[:error] = "Email already in use" + redirect_to '/signin' and return + end if !@user.admin Apartment::Tenant.switch(Company.find(@user.company_id).company_name.gsub(/'/,'').gsub(/\s/,'')) end