]> source.dussan.org Git - redmine.git/commitdiff
Unable to autoload constant Version.table_name if gems use Version class (#33206).
authorGo MAEDA <maeda@farend.jp>
Wed, 3 Mar 2021 14:39:23 +0000 (14:39 +0000)
committerGo MAEDA <maeda@farend.jp>
Wed, 3 Mar 2021 14:39:23 +0000 (14:39 +0000)
Patch by Alexander Meindl.

git-svn-id: http://svn.redmine.org/redmine/trunk@20760 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue.rb

index 1c0554f98c8072d8877514f02dafef91b3df56f6..fb82297b33014f568fad067b085a47c95d5adb5e 100644 (file)
@@ -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?