Sha256: 0a9d8242fbb30e15897581bcefa00f61e2226edbbbb6be34431cbb174776a565

Contents?: true

Size: 755 Bytes

Versions: 6

Compression:

Stored size: 755 Bytes

Contents

module Coprl
  module Presenters
    module Rails
      class Engine < ::Rails::Engine
        config.before_configuration do
          # load our engine from the rails-engine directory
          config.root = File.join(root,'rails-engine')
        end

        initializer 'coprl_presenters.middleware' do |app|
          # adds the public directory to the middleware so that the bundle.css and bundle.js are picked up
          # TODO: should rename these since they are common names that are likely going to collide
          app.middleware.use ::ActionDispatch::Static, File.join(root, '..', 'public')
        end

        ActiveSupport.on_load(:action_controller) do
          include Concerns::CoprlPartial
        end

      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
coprl-3.0.0.beta.12 lib/coprl/presenters/rails/engine.rb
coprl-3.0.0.beta.11 lib/coprl/presenters/rails/engine.rb
coprl-3.0.0.beta.10 lib/coprl/presenters/rails/engine.rb
coprl-3.0.0.beta.9 lib/coprl/presenters/rails/engine.rb
coprl-3.0.0.beta.8 lib/coprl/presenters/rails/engine.rb
coprl-3.0.0.beta.7 lib/coprl/presenters/rails/engine.rb