From 84f1b83df84d36b75cc7b6d1c84ffd84c6c07260 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Thu, 21 Apr 2011 11:03:56 -0500 Subject: Only include SprocketsHelper into assets context --- actionpack/lib/sprockets/railtie.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/sprockets/railtie.rb') diff --git a/actionpack/lib/sprockets/railtie.rb b/actionpack/lib/sprockets/railtie.rb index 2f7f95c44d..ccec65ba95 100644 --- a/actionpack/lib/sprockets/railtie.rb +++ b/actionpack/lib/sprockets/railtie.rb @@ -33,9 +33,10 @@ module Sprockets app.assets = asset_environment(app) - # FIXME: Temp hack for extending Sprockets::Context so ActiveSupport.on_load(:action_view) do - ::Sprockets::Context.send :include, ::ActionView::Helpers::SprocketsHelper + app.assets.context.instance_eval do + include ::ActionView::Helpers::SprocketsHelper + end end app.routes.append do @@ -59,4 +60,4 @@ module Sprockets env end end -end \ No newline at end of file +end -- cgit v1.2.3