Specifically set the bcf_ prefix now we're in a nested module

Otherwise, eager loading wont load the prefixed statement
pull/8068/head
Oliver Günther 5 years ago
parent 7bfde5f57e
commit 1d2a30be6b
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 7
      modules/bim/app/models/bim/bcf.rb
  2. 2
      modules/bim/app/models/bim/bcf/comment.rb
  3. 2
      modules/bim/app/models/bim/bcf/issue.rb
  4. 2
      modules/bim/app/models/bim/bcf/viewpoint.rb
  5. 2
      modules/bim/lib/open_project/bim/engine.rb
  6. 2
      modules/bim/lib/open_project/bim/patches/work_package_patch.rb

@ -1,7 +0,0 @@
module Bim
module Bcf
def self.table_name_prefix
'bcf_'
end
end
end

@ -1,5 +1,7 @@
module Bim::Bcf
class Comment < ActiveRecord::Base
self.table_name = :bcf_comments
include InitializeWithUuid
belongs_to :journal

@ -1,5 +1,7 @@
module Bim::Bcf
class Issue < ActiveRecord::Base
self.table_name = :bcf_issues
include InitializeWithUuid
include ::Concerns::VirtualAttribute

@ -1,5 +1,7 @@
module Bim::Bcf
class Viewpoint < ActiveRecord::Base
self.table_name = :bcf_viewpoints
include InitializeWithUuid
acts_as_attachable view_permission: :view_linked_issues,

@ -62,7 +62,7 @@ module OpenProject::Bim
delete_work_packages]
end
OpenProject::AccessControl.permission(:view_work_packages).actions << 'bcf/issues/redirect_to_bcf_issues_list'
OpenProject::AccessControl.permission(:view_work_packages).actions << 'bim/bcf/issues/redirect_to_bcf_issues_list'
::Redmine::MenuManager.map(:project_menu) do |menu|
menu.push(:ifc_models,

@ -31,7 +31,7 @@ require_dependency 'work_package'
module OpenProject::Bim::Patches::WorkPackagePatch
def self.included(base)
base.class_eval do
has_one :bcf_issue, class_name: 'Bim::Bcf::Issue', foreign_key: 'work_package_id'
has_one :bcf_issue, class_name: '::Bim::Bcf::Issue', foreign_key: 'work_package_id'
end
end
end

Loading…
Cancel
Save