Sha256: adfe4988a7b7a00546f66c5d2ccbf483c0db2c85dbc05e4ce9053a410051dd95

Contents?: true

Size: 1.2 KB

Versions: 11

Compression:

Stored size: 1.2 KB

Contents

require 'locomotive/dependencies'
require 'locomotive'

$:.unshift File.dirname(__FILE__) # TODO: not sure about that, looks pretty useless

module Locomotive
  class Engine < Rails::Engine

    isolate_namespace Locomotive

    # config.autoload_once_paths += %W( #{config.root}/app/controllers #{config.root}/app/models #{config.root}/app/helpers #{config.root}/app/uploaders)

    initializer 'locomotive.cells' do |app|
      Cell::Base.prepend_view_path("#{config.root}/app/cells")
    end

    initializer 'locomotive.action_controller' do |app|
      ::ActionController::Base.wrap_parameters :format => [:json]
    end

    initializer "Locomotive precompile hook", :group => :all do |app|
      app.config.assets.precompile += %w(locomotive.js locomotive.css locomotive/inline_editor.js locomotive/inline_editor.css
      locomotive/not_logged_in.js locomotive/not_logged_in.css
      locomotive/aloha.js)

      # Uncomment the lines below to view the names of assets as they are
      # precompiled for the rails asset pipeline
      #def compile_asset?(path)
        #puts "Compiling: #{path}"
        #true
      #end

      #app.config.assets.precompile = [ method(:compile_asset?).to_proc ]
    end

  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
tribeca_cms-0.1.1 lib/locomotive/engine.rb
tribeca_cms-2.0.0.rc12 lib/locomotive/engine.rb
locomotive_cms-2.0.0.rc12 lib/locomotive/engine.rb
locomotive_cms-2.0.0.rc11 lib/locomotive/engine.rb
locomotive_cms-2.0.0.rc10 lib/locomotive/engine.rb
locomotive_cms-2.0.0.rc9 lib/locomotive/engine.rb
locomotive_cms-2.0.0.rc8 lib/locomotive/engine.rb
locomotive_cms-2.0.0.rc7 lib/locomotive/engine.rb
locomotive_cms-2.0.0.rc6 lib/locomotive/engine.rb
locomotive_cms-2.0.0.rc5 lib/locomotive/engine.rb
locomotive_cms-2.0.0.rc4 lib/locomotive/engine.rb