From: Jean-Philippe Lang Date: Sat, 3 Jun 2017 09:22:41 +0000 (+0000) Subject: Using #joins is needed here with Rails 5. X-Git-Tag: 3.4.0~80 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5b61d569437221f7aaa3d02df298039e8a32ff4a;p=redmine.git Using #joins is needed here with Rails 5. git-svn-id: http://svn.redmine.org/redmine/trunk@16608 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- 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?