diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 13:18:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 13:18:24 +0000 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /app/models/concerns/mentionable.rb | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) | |
download | gitlab-ce-0653e08efd039a5905f3fa4f6e9cef9f5d2f799c.tar.gz |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'app/models/concerns/mentionable.rb')
-rw-r--r-- | app/models/concerns/mentionable.rb | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/app/models/concerns/mentionable.rb b/app/models/concerns/mentionable.rb index 4df9e32d8ec..a0ea5ac8012 100644 --- a/app/models/concerns/mentionable.rb +++ b/app/models/concerns/mentionable.rb @@ -217,17 +217,6 @@ module Mentionable def user_mention_association association(:user_mentions).reflection end - - # User mention that is parsed from model description rather then its related notes. - # Models that have a description attribute like Issue, MergeRequest, Epic, Snippet may have such a user mention. - # Other mentionable models like Commit, DesignManagement::Design, will never have such record as those do not have - # a description attribute. - # - # Using this method followed by a call to *save* may result in *ActiveRecord::RecordNotUnique* exception - # in a multi-threaded environment. Make sure to use it within a *safe_ensure_unique* block. - def model_user_mention - user_mentions.where(note_id: nil).first_or_initialize - end end Mentionable.prepend_mod_with('Mentionable') |