Sha256: 8e9135dc6931a7ce91ca06ee4388ecb975acfefa21fa44913397ea2e9235810a

Contents?: true

Size: 924 Bytes

Versions: 3

Compression:

Stored size: 924 Bytes

Contents

module C80Yax
  class Engine < ::Rails::Engine
    config.autoload_paths += %W(#{config.root}/app/models/c80_yax/concerns)
    isolate_namespace C80Yax

    initializer :c80_yax_engine do
      if defined?(ActiveAdmin)
        ActiveAdmin.application.load_paths += Dir["#{config.root}/app/helpers/**/"]
        ActiveAdmin.application.load_paths += Dir["#{config.root}/app/models/**/"]
        #ActiveAdmin.application.load_paths += Dir["#{config.root}/app/models/concerns/**/"]
        ActiveAdmin.application.load_paths += Dir["#{config.root}/app/admin/c80_yax/**/"]
        # ActiveAdmin.application.load_paths += Dir["#{config.root}/app/jobs/**/"]
      end
    end

    initializer :append_migrations do |app|
      unless app.root.to_s.match root.to_s
        config.paths["db/migrate"].expanded.each do |expanded_path|
          app.config.paths["db/migrate"] << expanded_path
        end
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
c80_yax-0.1.0.4 lib/c80_yax/engine.rb
c80_yax-0.1.0.3 lib/c80_yax/engine.rb
c80_yax-0.1.0.2 lib/c80_yax/engine.rb