mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Update for sprockets/master context class api
This commit is contained in:
parent
2e5d31223c
commit
e2c4282fbf
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue