diff options
Diffstat (limited to 'lib/tasks/assets.rake')
-rw-r--r-- | lib/tasks/assets.rake | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index f60c1b9f2..b642510a1 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -1,15 +1,13 @@ # frozen_string_literal: true def render_static_page(action, dest:, **opts) - I18n.with_locale(ENV['DEFAULT_LOCALE'] || I18n.default_locale) do - html = ApplicationController.render(action, opts) - File.write(dest, html) - end + html = ApplicationController.render(action, opts) + File.write(dest, html) end namespace :assets do desc 'Generate static pages' - task :generate_static_pages do + task generate_static_pages: :environment do render_static_page 'errors/500', layout: 'error', dest: Rails.root.join('public', 'assets', '500.html') end end |