From 5b61d569437221f7aaa3d02df298039e8a32ff4a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 3 Jun 2017 09:22:41 +0000 Subject: [PATCH] Using #joins is needed here with Rails 5. git-svn-id: http://svn.redmine.org/redmine/trunk@16608 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index dc5309b21..1e187da1f 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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? -- 2.39.5