Sha256: a4b10ae2ad3690eb35f77d7e2c187ddbf94c5965715f03a6304fd068f9c46714

Contents?: true

Size: 546 Bytes

Versions: 2

Compression:

Stored size: 546 Bytes

Contents

class DynamicConfigurationRailtie < Rails::Railtie
  config.to_prepare do
    if Rails.env == 'development'
      DynamicConfiguration.const_names.each do |const_name|
        Object.send(:remove_const, const_name) if Object.const_defined?(const_name)
      end
    end
  end

  initializer "dynamic_configuration.initialize" do |app|
    DynamicConfiguration.config_paths.each do |path|
      unless ActiveSupport::Dependencies.autoload_paths.include?(path)
        ActiveSupport::Dependencies.autoload_paths << path
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dynamic_configuration-0.3.16 lib/railtie.rb
dynamic_configuration-0.3.15 lib/railtie.rb