Improve can't create room view (#723)

* Improve cant create room view

* Translate role names in the promoted/demoted emails
This commit is contained in:
shawn-higgins1
2019-08-02 16:07:15 -04:00
committed by Jesus Federico
parent 402de8189e
commit 46e0595e3a
7 changed files with 82 additions and 25 deletions

View File

@ -303,8 +303,8 @@ class UsersController < ApplicationController
end
# Send promoted/demoted emails
added_roles.each { |role| send_user_promoted_email(@user, role.name) if role.send_promoted_email }
removed_roles.each { |role| send_user_demoted_email(@user, role.name) if role.send_demoted_email }
added_roles.each { |role| send_user_promoted_email(@user, role) if role.send_promoted_email }
removed_roles.each { |role| send_user_demoted_email(@user, role) if role.send_demoted_email }
# Update the roles
@user.roles.delete(removed_roles)