Skip to content

Commit

Permalink
Zeitwerk
Browse files Browse the repository at this point in the history
  • Loading branch information
picman committed Dec 30, 2024
1 parent 8cc664f commit 00a8817
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion patches/easy_crm_case_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def journalize_dmsf_file(dmsf_file, added_or_removed)
end

# Apply the patch
if Redmine::Plugin.installed?('easy_crm')
if defined?(EasyPatchManager)
EasyPatchManager.register_model_patch 'EasyCrmCase', 'RedmineDmsf::Patches::EasyCrmCasePatch',
if: -> { EasyPluginLoader.plugin_active? 'easy_crm_2_0' }
end
5 changes: 3 additions & 2 deletions patches/easy_crm_cases_controller_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ def controller_easy_crm_cases_before_save
end

# Apply the patch
if Redmine::Plugin.installed?('easy_crm')
if defined?(EasyPatchManager)
EasyPatchManager.register_controller_patch 'EasyCrmCasesController',
'RedmineDmsf::Patches::EasyCrmCasesControllerPatch',
prepend: true
prepend: true,
if: -> { Redmine::Plugin.installed? 'easy_crm_2_0' }
end

0 comments on commit 00a8817

Please sign in to comment.