summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-14 07:15:13 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-14 07:15:13 +0000
commitd2f7e31951d0e150df9cfd6da7d91d855f734d5f (patch)
tree35dfd4e7ff86f66c9eacb5bec14c63e920913896 /lib/plugins
parente58e676b7c15bb3f837f660f857d8e2a3e35f233 (diff)
downloadredmine-d2f7e31951d0e150df9cfd6da7d91d855f734d5f.tar.gz
redmine-d2f7e31951d0e150df9cfd6da7d91d855f734d5f.zip
Use .distinct instead of .uniq.
git-svn-id: http://svn.redmine.org/redmine/trunk@15654 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/plugins')
-rw-r--r--lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb b/lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb
index be8907188..3975169c0 100644
--- a/lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb
+++ b/lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb
@@ -167,7 +167,7 @@ module Redmine
scope.
reorder(searchable_options[:date_column] => :desc, :id => :desc).
limit(limit).
- uniq.
+ distinct.
pluck(searchable_options[:date_column], :id).
# converts timestamps to integers for faster sort
map {|timestamp, id| [timestamp.to_i, id]}