diff --git a/lib/turbograft.rb b/lib/turbograft.rb index 9f5f2493..23473d27 100644 --- a/lib/turbograft.rb +++ b/lib/turbograft.rb @@ -35,10 +35,8 @@ def referer end ActiveSupport.on_load(:action_view) do - (ActionView::RoutingUrlFor rescue ActionView::Helpers::UrlHelper).module_eval do - prepend XHRUrlFor - end - end unless RUBY_VERSION =~ /^1\.8/ + (ActionView::RoutingUrlFor rescue ActionView::Helpers::UrlHelper).prepend(XHRUrlFor) + end end end end