summaryrefslogtreecommitdiffstats
path: root/app/controllers/versions_controller.rb
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 /app/controllers/versions_controller.rb
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 'app/controllers/versions_controller.rb')
-rw-r--r--app/controllers/versions_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb
index fa9995198..e1684e3cf 100644
--- a/app/controllers/versions_controller.rb
+++ b/app/controllers/versions_controller.rb
@@ -38,7 +38,7 @@ class VersionsController < ApplicationController
@versions = @project.shared_versions.preload(:custom_values)
@versions += @project.rolled_up_versions.visible.preload(:custom_values) if @with_subprojects
- @versions = @versions.uniq.sort
+ @versions = @versions.to_a.uniq.sort
unless params[:completed]
@completed_versions = @versions.select(&:completed?)
@versions -= @completed_versions