Sha256: b8af7d2811b805c10402da899440f8fcee9d58997fbe6f95526f671208ea1398
Contents?: true
Size: 800 Bytes
Versions: 2
Compression:
Stored size: 800 Bytes
Contents
require "active_regulation/version" require "active_regulation/activation" require "active_regulation/containment" require "active_regulation/visibility" if defined?(Rails) require 'rails' module ActiveRegulation class Railtie < ::Rails::Railtie initializer 'active_regulation' do |app| ActiveRegulation::Railtie.instance_eval do locales_from(app.config.i18n.available_locales).each do |locale| (I18n.load_path << path(locale)) if File.file?(path(locale)) end end end protected def self.path(locale) File.expand_path("../../config/locales/#{locale}.yml", __FILE__) end def self.locales_from(args) array = Array(args || []) array.blank? ? '*' : array end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_regulation-1.0.0 | lib/active_regulation.rb |
active_regulation-0.1.0 | lib/active_regulation.rb |