]> cat aescling's git repositories - mastodon.git/blob - lib/tasks/assets.rake
New error page graphic. Other error page improvements (#5099)
[mastodon.git] / lib / tasks / assets.rake
1 # frozen_string_literal: true
2
3 namespace :assets do
4 desc 'Generate 500.html'
5 task :generate_500 do
6 I18n.with_locale(ENV['DEFAULT_LOCALE'] || I18n.default_locale) do
7 html = ApplicationController.render('errors/500', layout: 'error')
8 File.write(Rails.root.join('public', '500.html'), html)
9 end
10 end
11 end
12
13 if Rake::Task.task_defined?('assets:precompile')
14 Rake::Task['assets:precompile'].enhance do
15 Webpacker::Manifest.load
16 Rake::Task['assets:generate_500'].invoke
17 end
18 end
This page took 0.119841 seconds and 4 git commands to generate.