Use .distinct instead of .uniq.

git-svn-id: http://svn.redmine.org/redmine/trunk@15654 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2016-07-14 07:15:13 +00:00
parent e58e676b7c
commit d2f7e31951
14 changed files with 20 additions and 20 deletions

View File

@@ -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]}