Skip to content

Commit

Permalink
Merge pull request #38 from gtt-project/fix/zeitwerk-reload-issue
Browse files Browse the repository at this point in the history
Fix Zeitwerk reload issue
  • Loading branch information
sanak authored Aug 9, 2024
2 parents ca0df60 + fb38723 commit c3af621
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
16 changes: 0 additions & 16 deletions app/overrides/issues.rb

This file was deleted.

14 changes: 14 additions & 0 deletions app/overrides/issues/show.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Deface::Override.new(
:virtual_path => "issues/show",
:name => "deface_replace_render_half_width_custom_fields_rows",
:replace => "erb[loud]:contains('render_half_width_custom_fields_rows(@issue)')",
:original => "<%= render_half_width_custom_fields_rows(@issue) %>",
:text => "<%= render_custom_fields_rows_by_groups(@issue) %>"
)

Deface::Override.new(
:virtual_path => "issues/show",
:name => "deface_remove_render_full_width_custom_fields_rows",
:remove => "erb[loud]:contains('render_full_width_custom_fields_rows(@issue)')",
:original => "<%= render_full_width_custom_fields_rows(@issue) %>"
)
5 changes: 4 additions & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
end

if Rails.version > '6.0' && Rails.autoloaders.zeitwerk_enabled?
require_relative 'app/overrides/issues'
Dir.glob("#{Rails.root}/plugins/redmine_custom_fields_groups/app/overrides/**/*.rb").each do |path|
Rails.autoloaders.main.ignore(path)
require path
end
Rails.application.config.after_initialize do
RedmineCustomFieldsGroups.setup
end
Expand Down

0 comments on commit c3af621

Please sign in to comment.