Sha256: 46450fa8e54b2e5e43867130e449904b724afa1afb0a5570087cd1bb1d0d43cb
Contents?: true
Size: 281 Bytes
Versions: 3
Compression:
Stored size: 281 Bytes
Contents
require 'i18n/backend/fallbacks' module Dato module Utils module LocaleValue def self.find(obj) locale_with_value = I18n.fallbacks[I18n.locale] .find { |locale| obj[locale] } obj[locale_with_value || I18n.locale] end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dato-0.3.20 | lib/dato/utils/locale_value.rb |
dato-0.3.19 | lib/dato/utils/locale_value.rb |
dato-0.3.18 | lib/dato/utils/locale_value.rb |