Created
April 20, 2020 16:59
-
-
Save benhickson/d616f8a7aaa7b6bd06c4aa09244f3c3a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ApplicationRecord | |
def anon_display_name | |
if self.anonymous_user | |
self.anonymous_user.display_name | |
else | |
nil | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment