Skip to content

Commit c3af621

Browse files
authored
Merge pull request #38 from gtt-project/fix/zeitwerk-reload-issue
Fix Zeitwerk reload issue
2 parents ca0df60 + fb38723 commit c3af621

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

app/overrides/issues.rb

Lines changed: 0 additions & 16 deletions
This file was deleted.

app/overrides/issues/show.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Deface::Override.new(
2+
:virtual_path => "issues/show",
3+
:name => "deface_replace_render_half_width_custom_fields_rows",
4+
:replace => "erb[loud]:contains('render_half_width_custom_fields_rows(@issue)')",
5+
:original => "<%= render_half_width_custom_fields_rows(@issue) %>",
6+
:text => "<%= render_custom_fields_rows_by_groups(@issue) %>"
7+
)
8+
9+
Deface::Override.new(
10+
:virtual_path => "issues/show",
11+
:name => "deface_remove_render_full_width_custom_fields_rows",
12+
:remove => "erb[loud]:contains('render_full_width_custom_fields_rows(@issue)')",
13+
:original => "<%= render_full_width_custom_fields_rows(@issue) %>"
14+
)

init.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
end
2727

2828
if Rails.version > '6.0' && Rails.autoloaders.zeitwerk_enabled?
29-
require_relative 'app/overrides/issues'
29+
Dir.glob("#{Rails.root}/plugins/redmine_custom_fields_groups/app/overrides/**/*.rb").each do |path|
30+
Rails.autoloaders.main.ignore(path)
31+
require path
32+
end
3033
Rails.application.config.after_initialize do
3134
RedmineCustomFieldsGroups.setup
3235
end

0 commit comments

Comments
 (0)