Patch #43396 » 0001-Fix-assets-precomile.patch
| config/initializers/10-patches.rb | ||
|---|---|---|
| 120 | 120 | |
| 121 | 121 |
module Propshaft |
| 122 | 122 |
Assembly.prepend(Module.new do |
| 123 |
def initialize(config) |
|
| 124 |
super |
|
| 125 |
if Rails.application.config.assets.redmine_detect_update && (!config.manifest_path.exist? || manifest_outdated?) |
|
| 126 |
processor.process |
|
| 127 |
end |
|
| 123 |
def needs_precompile? |
|
| 124 |
Rails.application.config.assets.redmine_detect_update && (!config.manifest_path.exist? || manifest_outdated?) |
|
| 128 | 125 |
end |
| 129 | 126 | |
| 130 | 127 |
def manifest_outdated? |
| config/initializers/30-redmine.rb | ||
|---|---|---|
| 116 | 116 |
end |
| 117 | 117 |
end |
| 118 | 118 | |
| 119 |
# Automatically execute asset precompilation on startup in case of changes have been detected in assets |
|
| 120 |
Rails.application.config.after_initialize do |app| |
|
| 121 |
if app.assets.needs_precompile? |
|
| 122 |
app.assets.processor.process |
|
| 123 |
end |
|
| 124 |
end |
|
| 125 | ||
| 119 | 126 |
Rails.application.deprecators[:redmine] = ActiveSupport::Deprecation.new('7.0', 'Redmine')
|