Sha256: 11c4b5447d88f5d17cef143323ebc739ca349d401d97585739299188ba1eb039

Contents?: true

Size: 899 Bytes

Versions: 17

Compression:

Stored size: 899 Bytes

Contents

#
module AdminIt
  #
  class Engine < Rails::Engine
#    paths['app/controllers'] = File.join('lib', 'admin_it', 'controllers')

    config.to_prepare do
      Rails.application.config.i18n.load_path +=
        Dir[Engine.root.join('lib', 'admin_it', 'locales', '*.yml')]
      unless File.basename($PROGRAM_NAME) == 'rake' &&
             ARGV.include?('db:migrate')
        Dir[File.join(AdminIt.config.root, '**', '*.rb')].each do |file|
          require file
        end
      end
      # Assets.register(Rails.application.assets)

      ActionController::Base.module_eval do
        prepend_view_path File.join('lib', 'views')
      end
    end

    config.app_middleware.insert_after(Rack::ETag, Middleware)
    config.assets.precompile += ['admin_it/index.js', 'admin_it/index.css']
  end

  def self.config
    config = AdminIt::Config
    yield config if block_given?
    config
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
admin_it-1.3.8 lib/admin_it/engine.rb
admin_it-1.3.7 lib/admin_it/engine.rb
admin_it-1.3.6 lib/admin_it/engine.rb
admin_it-1.3.5 lib/admin_it/engine.rb
admin_it-1.3.4 lib/admin_it/engine.rb
admin_it-1.3.3 lib/admin_it/engine.rb
admin_it-1.3.2 lib/admin_it/engine.rb
admin_it-1.3.1 lib/admin_it/engine.rb
admin_it-1.3.0 lib/admin_it/engine.rb
admin_it-1.2.8 lib/admin_it/engine.rb
admin_it-1.2.7 lib/admin_it/engine.rb
admin_it-1.2.6 lib/admin_it/engine.rb
admin_it-1.2.5 lib/admin_it/engine.rb
admin_it-1.2.4 lib/admin_it/engine.rb
admin_it-1.2.3 lib/admin_it/engine.rb
admin_it-1.2.2 lib/admin_it/engine.rb
admin_it-1.2.1 lib/admin_it/engine.rb