Chore: Add display name to the user (#1067)

* Chore: Adding browser info to web widget triggered event

fixes: #970

* Chore: Rename nickname to display name

references: #972

* Chore: Change nickname in code

* chore: fix errors

* Chore: update nginx config

fixes: #1057

* Chore: Fix specs
This commit is contained in:
Sojan Jose
2020-07-20 18:28:14 +05:30
committed by GitHub
parent 29838f9424
commit d800b55ac6
13 changed files with 34 additions and 23 deletions

View File

@@ -9,12 +9,12 @@
# confirmed_at :datetime
# current_sign_in_at :datetime
# current_sign_in_ip :string
# display_name :string
# email :string
# encrypted_password :string default(""), not null
# last_sign_in_at :datetime
# last_sign_in_ip :string
# name :string not null
# nickname :string
# provider :string default("email"), not null
# pubsub_token :string
# remember_created_at :datetime
@@ -96,6 +96,10 @@ class User < ApplicationRecord
account_users.find_by(account_id: Current.account.id) if Current.account
end
def display_name
self[:display_name].presence || name
end
def account
current_account_user&.account
end