Permalink
Browse files

Only include SprocketsHelper into assets context

  • Loading branch information...
josh committed Apr 21, 2011
1 parent d31af44 commit 84f1b83df84d36b75cc7b6d1c84ffd84c6c07260
Showing with 4 additions and 3 deletions.
  1. +4 −3 actionpack/lib/sprockets/railtie.rb
@@ -33,9 +33,10 @@ def self.using_scss?
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 @@ def asset_environment(app)
env
end
end
-end
+end

0 comments on commit 84f1b83

Please sign in to comment.