Sha256: 763159dff503e1425c3a9bcf4b3f94d09c7939441926e982bca644afcf2cd31e

Contents?: true

Size: 627 Bytes

Versions: 2

Compression:

Stored size: 627 Bytes

Contents

require 'rails'

%w[version settings table_definition methods scopes base].each do |file_name|
  require "active_archive/#{file_name}"
end

require 'generators/active_archive/install_generator'

module ActiveArchive
  class Railtie < ::Rails::Railtie

    initializer 'active_archive' do |app|
      ActiveArchive::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

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_archive-4.0.7 lib/active_archive.rb
active_archive-4.0.6 lib/active_archive.rb