Module: Globalize::Inflections

Defined in:
lib/patches/active_support/inflections.rb

Instance Method Summary collapse

Instance Method Details

#instance_or_fallback(locale) ⇒ Object



4
5
6
7
8
9
# File 'lib/patches/active_support/inflections.rb', line 4

def instance_or_fallback(locale)
  I18n.respond_to?(:fallbacks) && I18n.fallbacks[locale].each do |k|
    return @__instance__[k] if @__instance__.key?(k)
  end
  instance(locale)
end