Skip to content
Snippets Groups Projects
Commit 0fea700c authored by Yamagishi Kazutoshi's avatar Yamagishi Kazutoshi Committed by Eugen Rochko
Browse files

Refresh manifest before generate 500.html (#5090)

parent 2c8e3fbb
No related branches found
No related tags found
No related merge requests found
# frozen_string_literal: true
if Rake::Task.task_defined?('assets:precompile')
Rake::Task['assets:precompile'].enhance do
namespace :assets do
desc 'Generate 500.html'
task :generate_500 do
html = ApplicationController.render('errors/500', layout: 'error')
File.write(Rails.root.join('public', '500.html'), html)
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment