Patch #43396 » 0001-Fix-assets-precomile.patch
| config/initializers/10-patches.rb | ||
|---|---|---|
|
module Propshaft
|
||
|
Assembly.prepend(Module.new do
|
||
|
def initialize(config)
|
||
|
super
|
||
|
if Rails.application.config.assets.redmine_detect_update && (!config.manifest_path.exist? || manifest_outdated?)
|
||
|
processor.process
|
||
|
end
|
||
|
def needs_precompile?
|
||
|
Rails.application.config.assets.redmine_detect_update && (!config.manifest_path.exist? || manifest_outdated?)
|
||
|
end
|
||
|
def manifest_outdated?
|
||
| config/initializers/30-redmine.rb | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
# 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?
|
||
|
app.assets.processor.process
|
||
|
end
|
||
|
end
|
||
|
Rails.application.deprecators[:redmine] = ActiveSupport::Deprecation.new('7.0', 'Redmine')
|
||