Sha256: fb839a4c53dded07157d9728eb793c42cf23e636386b40dcbdb1b4a8d80a1765

Contents?: true

Size: 1.47 KB

Versions: 4

Compression:

Stored size: 1.47 KB

Contents

module Optimacms
  class Engine < ::Rails::Engine
    isolate_namespace Optimacms


    config.watchable_dirs['lib'] = [:rb] if Rails.env.development?

    #config.autoload_paths << File.expand_path("../lib/some/path", __FILE__)
    #config.autoload_paths << File.expand_path("../lib/optimacms/path", __FILE__)

    config.autoload_paths += Dir["#{Optimacms::Engine.root}/app/helpers/"]
    config.autoload_paths += Dir["#{Optimacms::Engine.root}/app/helpers/optimacms/"]
    config.autoload_paths += Dir["#{Optimacms::Engine.root}/app/helpers/**/"]

    config.autoload_paths += Dir["#{Optimacms::Engine.root}/lib/"]
    config.autoload_paths += Dir["#{Optimacms::Engine.root}/lib/**/"]
    config.autoload_paths += Dir["#{Optimacms::Engine.root}/lib/optimacms/"]
    config.autoload_paths += Dir["#{Optimacms::Engine.root}/lib/optimacms/**/"]
    config.autoload_paths += Dir["#{Optimacms::Engine.root}/lib/optimacms/page_services/*.rb"]
    #config.autoload_paths += Dir["#{config.root}/lib/**/"]
    #config.autoload_paths += Dir["#{config.root}/lib/"]
    #config.autoload_paths += Dir["#{config.root}/lib/**/*.rb"]


    config.before_initialize do
      ActiveSupport.on_load :action_controller do
        include Optimacms::Mycontroller

        helper Optimacms::Engine.helpers
      end
    end

    initializer "optimacms assets precompile" do |app|

      app.config.assets.precompile += %w(admin.css admin.js optimacms/admin.css optimacms/admin.js optimacms/admin_tpl.css)


    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
optimacms-0.1.5 lib/optimacms/engine.rb
optimacms-0.1.3 lib/optimacms/engine.rb
optimacms-0.1.2 lib/optimacms/engine.rb
optimacms-0.1.1 lib/optimacms/engine.rb