Initialize I18n.backend translations

We were getting a 500 error because the translations had not been initialized
https://stackoverflow.com/a/4054527
This commit is contained in:
rgarcia
2018-07-27 00:23:14 +02:00
committed by Angel Perez
parent 78a5c0356e
commit feb3df1f93

View File

@@ -67,6 +67,7 @@ class Admin::SiteCustomization::InformationTextsController < Admin::SiteCustomiz
def append_or_create_keys
@content = {}
I18n.backend.send(:init_translations) unless I18n.backend.initialized?
translations = if params[:locale].present?
I18n.backend.send(:translations)[params[:locale].to_sym]
else