use route url helpers instead of hardcoding

This commit is contained in:
Zachary Chai
2017-02-17 16:05:59 -05:00
parent 16a1626130
commit 7873f640bc
3 changed files with 3 additions and 7 deletions

View File

@ -43,10 +43,6 @@ class User < ApplicationRecord
auth_hash['info']['email']
end
def room_url
"#{Rails.configuration.relative_url_root}/rooms/#{encrypted_id}"
end
def set_encrypted_id
self.encrypted_id = "#{username[0..1]}-#{Digest::SHA1.hexdigest(uid+provider)[0..7]}"
end