Sha256: 64bcc2c8a518773e79470235a3d66c494052ece5983e1eecc536e20959ab30e7

Contents?: true

Size: 800 Bytes

Versions: 1

Compression:

Stored size: 800 Bytes

Contents

require "active_regulation/version"
require "active_regulation/activation"
require "active_regulation/containment"
require "active_regulation/expiration"
require "active_regulation/quarantine"
require "active_regulation/suspension"
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
          [app.config.i18n.available_locales].flatten.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

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_regulation-3.0.0 lib/active_regulation.rb