Sha256: 2f8a2501f214ea9f841a863c5018ac9aa3b6ea0d59f9ef5292f3584a2ad476a6
Contents?: true
Size: 578 Bytes
Versions: 9
Compression:
Stored size: 578 Bytes
Contents
require 'active_data/model/attributes/reflections/localized' require 'active_data/model/attributes/localized' module ActiveData module Model module Localization extend ActiveSupport::Concern module ClassMethods def localized(*args, &block) add_attribute(ActiveData::Model::Attributes::Reflections::Localized, *args, &block) end def fallbacks(locale) ::I18n.respond_to?(:fallbacks) ? ::I18n.fallbacks[locale] : [locale] end def locale I18n.locale end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems