diff options
Diffstat (limited to 'actionpack/lib/sprockets')
-rw-r--r-- | actionpack/lib/sprockets/assets.rake | 6 | ||||
-rw-r--r-- | actionpack/lib/sprockets/helpers.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/sprockets/helpers/isolated_helper.rb (renamed from actionpack/lib/sprockets/helpers/precompile_helper.rb) | 2 | ||||
-rw-r--r-- | actionpack/lib/sprockets/railtie.rb | 5 |
4 files changed, 9 insertions, 8 deletions
diff --git a/actionpack/lib/sprockets/assets.rake b/actionpack/lib/sprockets/assets.rake index 80c3d4d0b8..a5145080c2 100644 --- a/actionpack/lib/sprockets/assets.rake +++ b/actionpack/lib/sprockets/assets.rake @@ -41,10 +41,8 @@ namespace :assets do config.assets.digest = digest unless digest.nil? config.assets.digests = {} - env = Rails.application.assets - env.context_class.send :include, ::Sprockets::Helpers::PrecompileHelper - - target = File.join(Rails.public_path, config.assets.prefix) + env = Rails.application.assets + target = File.join(Rails.public_path, config.assets.prefix) compiler = Sprockets::StaticCompiler.new(env, target, config.assets.precompile, diff --git a/actionpack/lib/sprockets/helpers.rb b/actionpack/lib/sprockets/helpers.rb index cd9c8f62e6..fee48386e0 100644 --- a/actionpack/lib/sprockets/helpers.rb +++ b/actionpack/lib/sprockets/helpers.rb @@ -1,6 +1,6 @@ module Sprockets module Helpers - autoload :RailsHelper, "sprockets/helpers/rails_helper" - autoload :PrecompileHelper, "sprockets/helpers/precompile_helper" + autoload :RailsHelper, "sprockets/helpers/rails_helper" + autoload :IsolatedHelper, "sprockets/helpers/isolated_helper" end end diff --git a/actionpack/lib/sprockets/helpers/precompile_helper.rb b/actionpack/lib/sprockets/helpers/isolated_helper.rb index ca7927f6fb..3adb928c45 100644 --- a/actionpack/lib/sprockets/helpers/precompile_helper.rb +++ b/actionpack/lib/sprockets/helpers/isolated_helper.rb @@ -1,6 +1,6 @@ module Sprockets module Helpers - module PrecompileHelper + module IsolatedHelper def controller nil end diff --git a/actionpack/lib/sprockets/railtie.rb b/actionpack/lib/sprockets/railtie.rb index e29612d320..3d330bd91a 100644 --- a/actionpack/lib/sprockets/railtie.rb +++ b/actionpack/lib/sprockets/railtie.rb @@ -43,7 +43,10 @@ module Sprockets ActiveSupport.on_load(:action_view) do include ::Sprockets::Helpers::RailsHelper - app.assets.context_class.send :include, ::Sprockets::Helpers::RailsHelper + app.assets.context_class.instance_eval do + include ::Sprockets::Helpers::IsolatedHelper + include ::Sprockets::Helpers::RailsHelper + end end end |