diff options
author | Robert Speicher <robert@gitlab.com> | 2018-10-29 18:35:05 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-10-29 18:35:05 +0000 |
commit | 6c5154b5bcb892864a4158e0554a0e13549a7e7c (patch) | |
tree | 7d53cca8708de8b626550adf16e1012b43575200 /app/models/user.rb | |
parent | 684ba98b7bae9a1d31cb1ce643d15a3add6753eb (diff) | |
parent | db80db793f43f9b4367730fc9b95c1925807f999 (diff) | |
download | gitlab-ce-6c5154b5bcb892864a4158e0554a0e13549a7e7c.tar.gz |
Merge branch 'rails5-deprecated-uniq' into 'master'
Replace deprecated uniq on a Relation with distinct
See merge request gitlab-org/gitlab-ce!22625
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index ca7fc3b058f..383b8f13d6b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1138,7 +1138,7 @@ class User < ActiveRecord::Base events = Event.select(:project_id) .contributions.where(author_id: self) .where("created_at > ?", Time.now - 1.year) - .uniq + .distinct .reorder(nil) Project.where(id: events) |