Sha256: ff8e225f6bbd12eeb27ffe100ef659a6230654200d0d1928f8c66d481262d407

Contents?: true

Size: 902 Bytes

Versions: 1

Compression:

Stored size: 902 Bytes

Contents

require 'will_paginate'

module ErpApp
  class Engine < Rails::Engine
    isolate_namespace ErpApp

    Mime::Type.register "tree", :tree

    config.erp_app = ErpApp::Config

	  initializer "erp_app_assets.merge_public" do |app|
      app.middleware.insert_before Rack::Runtime, ::ActionDispatch::Static, "#{root}/public"
    end
    
	  ActiveSupport.on_load(:active_record) do
      include ErpApp::Extensions::ActiveRecord::HasUserPreferences
    end
	  
	  ActiveSupport.on_load(:action_controller) do
      include ActiveExt
    end
      
	  #add observers
	  #this is ugly need a better way
	  (config.active_record.observers.nil?) ? config.active_record.observers = [:user_app_container_observer] : config.active_record.observers << :user_app_container_observer

    ErpBaseErpSvcs.register_as_compass_ae_engine(config, self)
    ::ErpApp::Widgets::Loader.load_root_widgets(config)

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
erp_app-4.0.0 lib/erp_app/engine.rb