Sha256: 2e3e4531987e367e51f8942ce4c7cc3c517c124dffaba94b9e3a99b319008de1

Contents?: true

Size: 1.77 KB

Versions: 6

Compression:

Stored size: 1.77 KB

Contents

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


    config.watchable_dirs['lib'] = [:rb] if Rails.env.development?
    config.watchable_dirs['app/helpers'] = [: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/simple_filter/"]
    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.generators do |g|
      g.test_framework :rspec
      g.fixture_replacement :factory_girl, :dir => 'spec/factories'
    end


    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

6 entries across 6 versions & 1 rubygems

Version Path
optimacms-0.1.44 lib/optimacms/engine.rb
optimacms-0.1.43 lib/optimacms/engine.rb
optimacms-0.1.41 lib/optimacms/engine.rb
optimacms-0.1.40 lib/optimacms/engine.rb
optimacms-0.1.39 lib/optimacms/engine.rb
optimacms-0.1.38 lib/optimacms/engine.rb