diff options
author | Joshua Peek <josh@joshpeek.com> | 2011-05-12 22:05:46 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2011-05-12 22:05:46 -0500 |
commit | e2c4282fbf9716d175b71a3f57ffd06e87683f1b (patch) | |
tree | ad128fdab887ef5b461d3686dedb2bb00efd2b20 /actionpack/lib/sprockets | |
parent | 2e5d31223c1ae2470d869f1333a7b829c61d40fc (diff) | |
download | rails-e2c4282fbf9716d175b71a3f57ffd06e87683f1b.tar.gz rails-e2c4282fbf9716d175b71a3f57ffd06e87683f1b.tar.bz2 rails-e2c4282fbf9716d175b71a3f57ffd06e87683f1b.zip |
Update for sprockets/master context class api
Diffstat (limited to 'actionpack/lib/sprockets')
-rw-r--r-- | actionpack/lib/sprockets/railtie.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/lib/sprockets/railtie.rb b/actionpack/lib/sprockets/railtie.rb index 0b4b0638b2..c75b7d4de0 100644 --- a/actionpack/lib/sprockets/railtie.rb +++ b/actionpack/lib/sprockets/railtie.rb @@ -34,7 +34,15 @@ module Sprockets 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 |