summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorLuke Duncalfe <lduncalfe@eml.cc>2019-06-18 17:15:53 +1200
committerLuke Duncalfe <lduncalfe@eml.cc>2019-08-21 10:00:00 +1200
commit330cbddec30840a72a52aade383286e58545ce98 (patch)
tree83b7c2044e738036e08e21ac38dae013cf60a3ac /app/finders
parent80c57bf6d13d6025a9568afb9cca36c279fac593 (diff)
downloadgitlab-ce-330cbddec30840a72a52aade383286e58545ce98.tar.gz
Renaming AwardedEmojiFinder to a Service
This finder class acts more as a service, as it only returns mapped data. Renaming this class allows us to create a new AwardEmojiFinder without the ambiguity of there being two similarly-named finders. https://gitlab.com/gitlab-org/gitlab-ce/issues/63372
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/awarded_emoji_finder.rb21
1 files changed, 0 insertions, 21 deletions
diff --git a/app/finders/awarded_emoji_finder.rb b/app/finders/awarded_emoji_finder.rb
deleted file mode 100644
index f0cc17f3b26..00000000000
--- a/app/finders/awarded_emoji_finder.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-# Class for retrieving information about emoji awarded _by_ a particular user.
-class AwardedEmojiFinder
- attr_reader :current_user
-
- # current_user - The User to generate the data for.
- def initialize(current_user = nil)
- @current_user = current_user
- end
-
- def execute
- return [] unless current_user
-
- # We want the resulting data set to be an Array containing the emoji names
- # in descending order, based on how often they were awarded.
- AwardEmoji
- .award_counts_for_user(current_user)
- .map { |name, _| { name: name } }
- end
-end