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