Sha256: cbf2ef33789a2212bba143e7afb0c3bcb24dd97506c5e8d16fed841bcb3f2699

Contents?: true

Size: 714 Bytes

Versions: 8

Compression:

Stored size: 714 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($0) == "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 'lib/views'
      end
    end
  end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
admin_it-1.0.11 lib/admin_it/engine.rb
admin_it-1.0.10 lib/admin_it/engine.rb
admin_it-1.0.9 lib/admin_it/engine.rb
admin_it-1.0.8 lib/admin_it/engine.rb
admin_it-1.0.7 lib/admin_it/engine.rb
admin_it-1.0.6 lib/admin_it/engine.rb
admin_it-1.0.5 lib/admin_it/engine.rb
admin_it-1.0.4 lib/admin_it/engine.rb