Permalink
Browse files

Remaining cleanup from changes to AssetTagHelper

  • Loading branch information...
1 parent 9dabbd0 commit 59f606578d21683bbbf4152bcdc2ebf1dd1e2e37 tomhuda committed May 24, 2011
@@ -187,12 +187,8 @@ def javascript_path(source)
#
# 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
@@ -137,12 +137,8 @@ def stylesheet_path(source)
# 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
@@ -4,6 +4,9 @@
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)
@@ -36,6 +36,8 @@ def self.using_scss?
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

0 comments on commit 59f6065

Please sign in to comment.