Sha256: a65ed3a8a6a559aed4625ff305ab4754b078c3b48b6658f593db53bd97a75db9

Contents?: true

Size: 1.51 KB

Versions: 11

Compression:

Stored size: 1.51 KB

Contents

require 'express_admin/menu'
require 'express_admin/version'
require 'express_admin/standard_actions'
require 'express_admin/search'
require 'express_templates'
require 'jquery-rails'
require 'jquery-ui-rails'
require 'select2-rails'
require 'dropzonejs-rails'
require 'sass-rails'
require 'foundation_apps_styles'
require 'gravatar_image_tag'
require 'kaminari'
require 'responders'
require 'tinymce-rails'
require 'textacular'

require File.join(File.dirname(__FILE__), '..', '..', 'app', 'components', 'express_admin', 'definition_list')

# should be a way to add this folder to rails' autoload paths
components = Dir.glob(File.join(File.dirname(__FILE__), '..', '..', 'app', 'components', '**', '*.rb'))
components.sort!
components.each {|component| require component }

module ExpressAdmin
  class Engine < ::Rails::Engine

    initializer :assets do |config|
      Rails.application.config.assets.precompile << /\.(?:svg|eot|woff|ttf|png|jpg|jpeg|gif)$/
      Rails.application.config.assets.precompile += %w( express_admin.js express_admin.css )
    end

    def all_rails_engines
      Rails.application.eager_load!
      @all_engines ||= ::Rails::Engine.descendants
    end

    # Find all the rails engines that have
    # :addon_name presumably from including
    # ExpressAdmin::Menu::Loader
    def all_addons
      @all_addons ||= all_rails_engines.select do |engine|
        engine.methods.include?(:addon_name)
      end
    end

  end

  class Railtie < ::Rails::Railtie
    config.app_generators.template_engine :et
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
express_admin-1.7.26 lib/express_admin/engine.rb
express_admin-1.7.25 lib/express_admin/engine.rb
express_admin-1.7.24 lib/express_admin/engine.rb
express_admin-1.7.23 lib/express_admin/engine.rb
express_admin-1.7.22 lib/express_admin/engine.rb
express_admin-1.7.21 lib/express_admin/engine.rb
express_admin-1.7.20 lib/express_admin/engine.rb
express_admin-1.7.19 lib/express_admin/engine.rb
express_admin-1.7.18 lib/express_admin/engine.rb
express_admin-1.7.17 lib/express_admin/engine.rb
express_admin-1.7.16 lib/express_admin/engine.rb