Skip to content
Snippets Groups Projects
Commit 778b3779 authored by Akihiko Odaki's avatar Akihiko Odaki Committed by Eugen Rochko
Browse files

Do not fetch environment variables to determine default locale (#6618)

The default locale is now set by config.
parent b66ec3bf
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
end
def languages
[ENV.fetch('DEFAULT_LOCALE', I18n.default_locale)]
[I18n.default_locale]
end
private
......
# 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
......
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