Sha256: 963acffef92d71fc44662e2455342f58bf269e7a4683909730304fe8a5053c20

Contents?: true

Size: 958 Bytes

Versions: 6

Compression:

Stored size: 958 Bytes

Contents

require_relative '../../app/helpers/c80_features/application_helper'

module C80Features
  class Engine < ::Rails::Engine
    isolate_namespace C80Features

    initializer :c80_features_engine do
      if defined?(ActiveAdmin)
        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_features/**/"]
        # ActiveAdmin.application.load_paths += Dir["#{config.root}/app/jobs/**/"]
      end

      ActiveSupport.on_load(:action_view) do
        include C80Features::ApplicationHelper
      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

6 entries across 6 versions & 1 rubygems

Version Path
c80_features-0.1.3.2 lib/c80_features/engine.rb
c80_features-0.1.3.1 lib/c80_features/engine.rb
c80_features-0.1.3 lib/c80_features/engine.rb
c80_features-0.1.2 lib/c80_features/engine.rb
c80_features-0.1.1 lib/c80_features/engine.rb
c80_features-0.1.0 lib/c80_features/engine.rb