mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-15 18:39:58 +01:00
added a helper!
This commit is contained in:
parent
abe75c89a2
commit
0765677555
1 changed files with 7 additions and 0 deletions
|
@ -1,2 +1,9 @@
|
|||
module UserHelper
|
||||
# Decides what user name to show.
|
||||
# @return [String] The user name
|
||||
def user_screen_name(user)
|
||||
return APP_CONFIG['anonymous_name'] if user.nil?
|
||||
return user.display_name unless user.display_name.blank?
|
||||
user.screen_name
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue