Using #joins is needed here with Rails 5.

git-svn-id: http://svn.redmine.org/redmine/trunk@16608 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2017-06-03 09:22:41 +00:00
parent 09b0c3135c
commit 5b61d56943

View 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?