Sha256: ee4fa7ece751e89cf5900c3cef0b5bc31d6e25a775fd46363b55a4b2c3b06ac3

Contents?: true

Size: 841 Bytes

Versions: 2

Compression:

Stored size: 841 Bytes

Contents

# require 'simple-navigation'
# SimpleNavigation.config_file_paths << File.expand_path(File.join(%w(.. .. config)), __FILE__)

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

2 entries across 2 versions & 1 rubygems

Version Path
admin_it-1.0.3 lib/admin_it/engine.rb
admin_it-1.0.2 lib/admin_it/engine.rb