Sha256: 054074cdfc069c02570871e7b921f506c0e5fa326e6b235230ce3f0af42fa2fe

Contents?: true

Size: 386 Bytes

Versions: 6

Compression:

Stored size: 386 Bytes

Contents

# load all custom initializers of plugins or themes
Rails.application.config.to_prepare do |_config|
  PluginRoutes.all_apps.each do |ap|
    next unless ap['path'].present?

    f = File.join(ap['path'], 'config', 'initializer.rb')
    eval(File.read(f)) if File.exist?(f)

    f = File.join(ap['path'], 'config', 'custom_models.rb')
    eval(File.read(f)) if File.exist?(f)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
camaleon_cms-2.7.5 config/initializers/custom_initializers.rb
camaleon_cms-2.7.4 config/initializers/custom_initializers.rb
camaleon_cms-2.7.3 config/initializers/custom_initializers.rb
camaleon_cms-2.7.2 config/initializers/custom_initializers.rb
camaleon_cms-2.7.1 config/initializers/custom_initializers.rb
camaleon_cms-2.7.0 config/initializers/custom_initializers.rb