Parent

Class Index [+]

Quicksearch

I18n::Railtie

Public Class Methods

reloader() click to toggle source
    # File lib/active_support/i18n_railtie.rb, line 13
13:     def self.reloader
14:       @reloader ||= ActiveSupport::FileUpdateChecker.new([]){ I18n.reload! }
15:     end

Protected Class Methods

include_fallbacks_module() click to toggle source
    # 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
init_fallbacks(fallbacks) click to toggle source
    # 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
validate_fallbacks(fallbacks) click to toggle source
    # 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.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.