Commit 1345c0a3 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Explicitly require the `ComplianceFramework` dependency

Since we already have ComplianceFramework module defined in it's own
file, if that file is not loaded into memory by autoload and if the
other files within the namespace of ComplianceFramework are loaded into
memory, accessing the attributes of that constant would raise error
because autoload won't load that file since the module is already
defined somewhere else.
parent 54a7ab6a
# frozen_string_literal: true
require_dependency 'compliance_management/compliance_framework'
module ComplianceManagement
module ComplianceFramework
module ProjectSettingsHelper
......@@ -64,7 +66,7 @@ module ComplianceManagement
def compliance_framework_tooltip_values
@compliance_framework_tooltip_values ||=
compliance_framework_title_values.map { |k, v| [k, get_compliance_framework_tooltip(v)] }.to_h
compliance_framework_title_values.transform_values { |v| get_compliance_framework_tooltip(v) }
end
def get_compliance_framework_tooltip(framework)
......
# frozen_string_literal: true
require_dependency 'compliance_management/compliance_framework'
module ComplianceManagement
module ComplianceFramework
class ProjectSettings < ApplicationRecord
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment