Fix home room not being created if user gets assigned new role (#1750)

This commit is contained in:
Ahmad Farhat
2020-06-04 12:05:58 -04:00
committed by GitHub
parent 33ca929630
commit f9e85aadb9
2 changed files with 29 additions and 1 deletions

View File

@ -62,7 +62,7 @@ module Rolify
# Send promoted/demoted emails
send_user_promoted_email(@user, new_role) if new_role.get_permission("send_promoted_email")
@user.update_attribute(:role_id, role_id)
@user.set_role(new_role.name)
end
# Updates a roles priority