Sha256: 096b4562833d0daaad748be1c8c63bf89a116a755bcedf06b455809e552ed286

Contents?: true

Size: 517 Bytes

Versions: 1

Compression:

Stored size: 517 Bytes

Contents

# frozen_string_literal: true

module Lite
  module Validators
    class Railtie < ::Rails::Railtie

      initializer 'lite-validators' do |app|
        Lite::Validators::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-validators-1.0.2 lib/lite/validators/railtie.rb