]> source.dussan.org Git - redmine.git/commitdiff
Using #joins is needed here with Rails 5.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 3 Jun 2017 09:22:41 +0000 (09:22 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 3 Jun 2017 09:22:41 +0000 (09:22 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@16608 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/project.rb

index dc5309b21754617687bea2009ef8e91a3dcefc7a..1e187da1f032c14b1af61cc6d74d9667e50c973e 100644 (file)
@@ -368,7 +368,7 @@ class Project < ActiveRecord::Base
 
     if version_ids.any? &&
       Issue.
-        includes(:project).
+        joins(:project).
         where("#{Project.table_name}.lft < ? OR #{Project.table_name}.rgt > ?", lft, rgt).
         where(:fixed_version_id => version_ids).
         exists?