Permalink
Browse files

Update for sprockets/master context class api

  • Loading branch information...
1 parent 2e5d312 commit e2c4282fbf9716d175b71a3f57ffd06e87683f1b @josh josh committed May 13, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 actionpack/lib/sprockets/railtie.rb
View
10 actionpack/lib/sprockets/railtie.rb
@@ -34,7 +34,15 @@ def self.using_scss?
app.assets = asset_environment(app)
ActiveSupport.on_load(:action_view) do
- app.assets.context.instance_eval do
+ if app.assets.respond_to?(:context_class)
+ context = app.assets.context_class
+
+ # TODO: Remove this condition when Sprockets 2.0.beta.3 is released
+ else
+ context = app.assets.context
+ end
+
+ context.instance_eval do
include ::ActionView::Helpers::SprocketsHelper
end
end

0 comments on commit e2c4282

Please sign in to comment.