Fix patch loader for plugins, which gemified

This commit is contained in:
Alexander Meindl 2021-11-27 09:00:31 +01:00
parent ad2d4b7f1f
commit 28c68d5210

View File

@ -191,7 +191,7 @@ class AdditionalsLoader
patches.each do |patch|
patch_module = if patch[:patch].is_a? String
patch_dir = Rails.root.join "plugins/#{plugin_id}/lib/#{plugin_id}/patches"
patch_dir = "#{plugin_dir}/lib/#{plugin_id}/patches"
require "#{patch_dir}/#{patch[:patch].underscore}_patch"
"#{plugin_id.camelize}::Patches::#{patch[:patch]}Patch".constantize
else