lib/remotipart/rails/railtie.rb in remotipart-1.3.1 vs lib/remotipart/rails/railtie.rb in remotipart-1.4.0
- old
+ new
@@ -21,16 +21,20 @@
config.action_view.javascript_expansions[:defaults].push(*FILES)
end
end
initializer "remotipart.view_helper" do
- ActionView::Base.send :include, RequestHelper
- ActionView::Base.send :include, ViewHelper
+ ActiveSupport.on_load(:action_view) do
+ include RequestHelper
+ include ViewHelper
+ end
end
initializer "remotipart.controller_helper" do
- ActionController::Base.send :include, RequestHelper
- ActionController::Base.send :include, RenderOverrides
+ ActiveSupport.on_load(:action_controller) do
+ include RequestHelper
+ include RenderOverrides
+ end
end
initializer "remotipart.include_middelware" do
config.app_middleware.insert_after ActionDispatch::ParamsParser, Middleware
end