aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authortomhuda <tomhuda@strobecorp.com>2011-05-23 23:30:06 -0700
committerwycats <wycats@gmail.com>2011-05-24 00:39:04 -0700
commit00be5bd75d0980c467d76b5eecf43490d0f32553 (patch)
treec37b4f6459f307a9ca8d5bc4fe441c9d41b636b6 /actionpack
parent72c7160d0d641e12562412ac0872c7452581e5e0 (diff)
downloadrails-00be5bd75d0980c467d76b5eecf43490d0f32553.tar.gz
rails-00be5bd75d0980c467d76b5eecf43490d0f32553.tar.bz2
rails-00be5bd75d0980c467d76b5eecf43490d0f32553.zip
Remaining cleanup from changes to AssetTagHelper
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb8
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb8
-rw-r--r--actionpack/lib/sprockets/helpers/rails_helper.rb3
-rw-r--r--actionpack/lib/sprockets/railtie.rb2
4 files changed, 9 insertions, 12 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb b/actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb
index e1ee0d0e1a..0f8a63901e 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb
@@ -187,12 +187,8 @@ module ActionView
#
# javascript_include_tag :all, :cache => true, :recursive => true
def javascript_include_tag(*sources)
- if config.use_sprockets
- sprockets_javascript_include_tag(*sources)
- else
- @javascript_include ||= JavascriptIncludeTag.new(config, asset_paths)
- @javascript_include.include_tag(*sources)
- end
+ @javascript_include ||= JavascriptIncludeTag.new(config, asset_paths)
+ @javascript_include.include_tag(*sources)
end
end
end
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb b/actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb
index a95eb221be..e4f11c9bc7 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb
@@ -137,12 +137,8 @@ module ActionView
# stylesheet_link_tag :all, :concat => true
#
def stylesheet_link_tag(*sources)
- if config.use_sprockets
- sprockets_stylesheet_link_tag(*sources)
- else
- @stylesheet_include ||= StylesheetIncludeTag.new(config, asset_paths)
- @stylesheet_include.include_tag(*sources)
- end
+ @stylesheet_include ||= StylesheetIncludeTag.new(config, asset_paths)
+ @stylesheet_include.include_tag(*sources)
end
end
diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb
index 3b64be67d9..a99dcad81d 100644
--- a/actionpack/lib/sprockets/helpers/rails_helper.rb
+++ b/actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -4,6 +4,9 @@ require "action_view/helpers/asset_tag_helper"
module Sprockets
module Helpers
module RailsHelper
+ extend ActiveSupport::Concern
+ include ActionView::Helpers::AssetTagHelper
+
def asset_paths
@asset_paths ||= begin
config = self.config if respond_to?(:config)
diff --git a/actionpack/lib/sprockets/railtie.rb b/actionpack/lib/sprockets/railtie.rb
index da5cb320a6..db0f02a6ab 100644
--- a/actionpack/lib/sprockets/railtie.rb
+++ b/actionpack/lib/sprockets/railtie.rb
@@ -36,6 +36,8 @@ module Sprockets
app.assets = asset_environment(app)
ActiveSupport.on_load(:action_view) do
+ include ::Sprockets::Helpers::RailsHelper
+
app.assets.context_class.instance_eval do
include ::Sprockets::Helpers::RailsHelper
end