summaryrefslogtreecommitdiffstats
path: root/app/models/issue.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-03-03 14:39:23 +0000
committerGo MAEDA <maeda@farend.jp>2021-03-03 14:39:23 +0000
commit5d251f28d0f634fd4f3134a92eb7a6aa93925d94 (patch)
tree8b3ed35abb1a076e8749610648ac5d3aebbeae02 /app/models/issue.rb
parentd19e0f987a29cec00ed2446e08bd1e5fe66bf096 (diff)
downloadredmine-5d251f28d0f634fd4f3134a92eb7a6aa93925d94.tar.gz
redmine-5d251f28d0f634fd4f3134a92eb7a6aa93925d94.zip
Unable to autoload constant Version.table_name if gems use Version class (#33206).
Patch by Alexander Meindl. git-svn-id: http://svn.redmine.org/redmine/trunk@20760 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 1c0554f98..fb82297b3 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -1864,8 +1864,8 @@ class Issue < ActiveRecord::Base
# a different project and that is not systemwide shared
Issue.joins(:project, :fixed_version).
where("#{Issue.table_name}.fixed_version_id IS NOT NULL" +
- " AND #{Issue.table_name}.project_id <> #{Version.table_name}.project_id" +
- " AND #{Version.table_name}.sharing <> 'system'").
+ " AND #{Issue.table_name}.project_id <> #{::Version.table_name}.project_id" +
+ " AND #{::Version.table_name}.sharing <> 'system'").
where(conditions).each do |issue|
next if issue.project.nil? || issue.fixed_version.nil?