diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-03 15:08:43 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-03 15:08:43 +0000 |
commit | dbe0e5676267eb142dd8d81e4c881c997cb96962 (patch) | |
tree | 765b50588c3c1540297dc6a76eea1122dd59cdac /app/helpers/users_helper.rb | |
parent | 14a32c2d551a646525b1fabd93cb70a0e6924478 (diff) | |
download | gitlab-ce-dbe0e5676267eb142dd8d81e4c881c997cb96962.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/users_helper.rb')
-rw-r--r-- | app/helpers/users_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 218e13f1e40..4c8765618d0 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -8,6 +8,13 @@ module UsersHelper } end + def user_clear_status_at(user) + # The user.status can be nil when the user has no status, so we need to protect against that case. + # iso8601 is the official RFC supported format for frontend parsing of date: + # https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date + user.status&.clear_status_at&.to_s(:iso8601) + end + def user_link(user) link_to(user.name, user_path(user), title: user.email, |