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

The default locale is now set by config.
这个提交存在于:
Akihiko Odaki 2018-03-04 18:00:46 +09:00 提交者 Eugen Rochko
父节点 b66ec3bf95
当前提交 778b37790b
共有 2 个文件被更改,包括 3 次插入5 次删除

查看文件

@ -48,7 +48,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
end
def languages
[ENV.fetch('DEFAULT_LOCALE', I18n.default_locale)]
[I18n.default_locale]
end
private

查看文件

@ -1,10 +1,8 @@
# 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