GRN2-xx: Email and admin fix (#515)

* Email and admin fix

* Redirected super_admins to the admins page

* Small fix

* Update rooms_controller.rb
This commit is contained in:
farhatahmad
2019-05-09 18:07:18 -04:00
committed by Jesus Federico
parent 63ada8b3db
commit 75bde6a42d
10 changed files with 58 additions and 27 deletions

View File

@ -18,7 +18,7 @@
class UsersController < ApplicationController
include RecordingsHelper
include Verifier
include Emailer
before_action :find_user, only: [:edit, :update, :destroy]
before_action :ensure_unauthenticated, only: [:new, :create]
@ -46,7 +46,7 @@ class UsersController < ApplicationController
# Start email verification and redirect to root.
begin
@user.send_activation_email(user_verification_link)
send_activation_email(@user)
rescue => e
logger.error "Error in email delivery: #{e}"
flash[:alert] = I18n.t(params[:message], default: I18n.t("delivery_error"))