Rails::Railtie
# File lib/active_support/i18n_railtie.rb, line 51
51: def self.include_fallbacks_module
52: I18n.backend.class.send(:include, I18n::Backend::Fallbacks)
53: end
# File lib/active_support/i18n_railtie.rb, line 55
55: def self.init_fallbacks(fallbacks)
56: include_fallbacks_module
57:
58: args = case fallbacks
59: when ActiveSupport::OrderedOptions
60: [*(fallbacks[:defaults] || []) << fallbacks[:map]].compact
61: when Hash, Array
62: Array.wrap(fallbacks)
63: else # TrueClass
64: []
65: end
66:
67: I18n.fallbacks = I18n::Locale::Fallbacks.new(*args)
68: end
# File lib/active_support/i18n_railtie.rb, line 70
70: def self.validate_fallbacks(fallbacks)
71: case fallbacks
72: when ActiveSupport::OrderedOptions
73: !fallbacks.empty?
74: when TrueClass, Array, Hash
75: true
76: else
77: raise "Unexpected fallback type #{fallbacks.inspect}"
78: end
79: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.