Sha256: 23f8e25f4431de50993eb3a74fc4a1d465524f77fdf9e9db4b86bd20ae5de256
Contents?: true
Size: 916 Bytes
Versions: 29
Compression:
Stored size: 916 Bytes
Contents
# frozen_string_literal: true module PagesCore module PageModel module Localizable include ActiveSupport::Inflector extend ActiveSupport::Concern included do localizable do attribute :name attribute :body attribute :excerpt attribute :headline attribute :boxout attribute :path_segment attribute :meta_title attribute :meta_description attribute :open_graph_title attribute :open_graph_description dictionary(lambda do PagesCore::Templates::TemplateConfiguration.localized_blocks end) end end def transliterated_name prev_locale = I18n.locale I18n.locale = locale.to_sym if locale transliterated = transliterate(name) I18n.locale = prev_locale transliterated end end end end
Version data entries
29 entries across 29 versions & 1 rubygems