Sha256: 3e47e14b98e4a2556d8902f03965f7b67aafe9e6297159041d81ae2af4b2ce43
Contents?: true
Size: 692 Bytes
Versions: 68
Compression:
Stored size: 692 Bytes
Contents
module Pageflow module PublicI18nHelper def public_i18n_javascript_tag(entry) render('pageflow/public_i18n/javascript_tag', entry_locale: entry.locale, translations: public_i18n_translations(entry)) end def public_i18n_translations(entry) merge_ignoring_nil = lambda do |_, fallback, value| value.presence || fallback end { pageflow: { public: I18n.t('pageflow.public', locale: I18n.default_locale) .dup .deep_merge(I18n.t('pageflow.public', locale: entry.locale), &merge_ignoring_nil) } } end end end
Version data entries
68 entries across 68 versions & 1 rubygems