Sha256: 5d26a96c91ef9eafa54dff493ffae6f4fcf28af09818cc783d1cd17977a09e8e
Contents?: true
Size: 545 Bytes
Versions: 1
Compression:
Stored size: 545 Bytes
Contents
if defined?(Rails) require 'rails' module ActiveValidation class Railtie < ::Rails::Railtie initializer 'active_validation' do |app| ActiveValidation::Railtie.instance_eval do [app.config.i18n.available_locales].flatten.each do |locale| (I18n.load_path << path(locale)) if File.file?(path(locale)) end end end def self.path(locale) File.expand_path("../../config/locales/#{locale}.yml", __FILE__) end private_class_method :path end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_validation-4.0.4 | lib/active_validation/railtie.rb |