Sha256: 4cc9ca917830817e77ee9d759fa1b9b777ad2ab06504eb4645cae11d7165d077

Contents?: true

Size: 517 Bytes

Versions: 1

Compression:

Stored size: 517 Bytes

Contents

# frozen_string_literal: true

module Lite
  module Regulation
    class Railtie < ::Rails::Railtie

      initializer 'lite-regulation' do |app|
        Lite::Regulation::Railtie.instance_eval do
          [app.config.i18n.available_locales].flatten.each do |locale|
            path = File.expand_path("../../../config/locales/#{locale}.yml", __FILE__)
            next if !File.file?(path) || I18n.load_path.include?(path)

            I18n.load_path << path
          end
        end
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lite-regulation-1.0.0 lib/lite/regulation/railtie.rb