lib/remotipart/rails/railtie.rb in remotipart-0.4.2 vs lib/remotipart/rails/railtie.rb in remotipart-1.0
- old
+ new
@@ -3,11 +3,11 @@
module Rails
class Railtie < ::Rails::Railtie
config.before_configuration do
# Files to be added to :defaults
- FILES = ['jquery.form', 'jquery.remotipart']
+ FILES = ['jquery.iframe-transport', 'jquery.remotipart']
# Figure out where rails.js (aka jquery_ujs.js if install by jquery-rails gem) is
# in the :defaults array
position = config.action_view.javascript_expansions[:defaults].index('rails') ||
config.action_view.javascript_expansions[:defaults].index('jquery_ujs')
@@ -27,9 +27,14 @@
ActionView::Base.send :include, ViewHelper
end
initializer "remotipart.controller_helper" do
ActionController::Base.send :include, RequestHelper
+ ActionController::Base.send :include, RenderOverrides
+ end
+
+ initializer "remotipart.include_middelware" do
+ config.app_middleware.insert_after ActionDispatch::ParamsParser, Middleware
end
end
end
end