Module: ActiveData::Model::Localization::ClassMethods
- Defined in:
- lib/active_data/model/localization.rb
Instance Method Summary collapse
Instance Method Details
#fallbacks(locale) ⇒ Object
14 15 16 |
# File 'lib/active_data/model/localization.rb', line 14 def fallbacks(locale) ::I18n.respond_to?(:fallbacks) ? ::I18n.fallbacks[locale] : [locale] end |
#locale ⇒ Object
18 19 20 |
# File 'lib/active_data/model/localization.rb', line 18 def locale I18n.locale end |
#localized(*args, &block) ⇒ Object
10 11 12 |
# File 'lib/active_data/model/localization.rb', line 10 def localized(*args, &block) add_attribute(ActiveData::Model::Attributes::Reflections::Localized, *args, &block) end |