Sha256: 3f6fbf2cac2cc2020649e7dfb41a4770fa5d5f278b58b1dbf9a6fe921b6ca405

Contents?: true

Size: 897 Bytes

Versions: 1

Compression:

Stored size: 897 Bytes

Contents

# Configure Rails 3.1
module Remotipart
  module Rails

    class Engine < ::Rails::Engine
      initializer "remotipart.view_helper" do
        ActiveSupport.on_load :action_view do
          include RequestHelper
          include ViewHelper
        end
      end

      initializer "remotipart.controller_helper" do
        ActiveSupport.on_load :action_controller do
          include RequestHelper
          include RenderOverrides
        end
      end

      initializer "remotipart.include_middelware" do
        if ::Rails.version >= '5'
          # Rails 5 no longer instantiates ActionDispatch::ParamsParser
          # https://github.com/rails/rails/commit/a1ced8b52ce60d0634e65aa36cb89f015f9f543d
          config.app_middleware.use Middleware
        else
          config.app_middleware.insert_after ActionDispatch::ParamsParser, Middleware
        end
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
remotipart-1.4.4 lib/remotipart/rails/engine.rb