Module: Dato::Utils::LocaleValue
- Defined in:
- lib/dato/utils/locale_value.rb
Class Method Summary collapse
Class Method Details
.find(obj) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/dato/utils/locale_value.rb', line 8 def self.find(obj) locale_with_value = I18n.fallbacks[I18n.locale] .find { |locale| obj[locale] } obj[locale_with_value || I18n.locale] end |