Project

General

Profile

Patch #43396 » 0002-Refactor-Fix-assets-precompile.patch

Takenori TAKAKI, 2025-11-06 03:08

View differences:

config/initializers/10-patches.rb
module Propshaft
Assembly.prepend(Module.new do
def needs_precompile?
Rails.application.config.assets.redmine_detect_update && (!config.manifest_path.exist? || manifest_outdated?)
!config.manifest_path.exist? || manifest_outdated?
end
def manifest_outdated?
config/initializers/30-redmine.rb
# Automatically execute asset precompilation on startup in case of changes have been detected in assets
Rails.application.config.after_initialize do |app|
if app.assets.needs_precompile?
if app.config.assets.redmine_detect_update && app.assets.needs_precompile?
app.assets.processor.process
end
end
(3-3/3)