Refresh manifest before generate 500.html (#5090)
parent
2c8e3fbbfb
commit
0fea700c7b
@ -1,8 +1,17 @@ |
|||||||
# frozen_string_literal: true |
# frozen_string_literal: true |
||||||
|
|
||||||
if Rake::Task.task_defined?('assets:precompile') |
namespace :assets do |
||||||
Rake::Task['assets:precompile'].enhance do |
desc 'Generate 500.html' |
||||||
|
task :generate_500 do |
||||||
html = ApplicationController.render('errors/500', layout: 'error') |
html = ApplicationController.render('errors/500', layout: 'error') |
||||||
File.write(Rails.root.join('public', '500.html'), html) |
File.write(Rails.root.join('public', '500.html'), html) |
||||||
end |
end |
||||||
end |
end |
||||||
|
|
||||||
|
if Rake::Task.task_defined?('assets:precompile') |
||||||
|
Rake::Task['assets:precompile'].enhance do |
||||||
|
Webpacker::Manifest.load |
||||||
|
|
||||||
|
Rake::Task['assets:generate_500'].invoke |
||||||
|
end |
||||||
|
end |
||||||
|
Loading…
Reference in new issue