From 0ff1c5935f84f86a8b88802078b115e9964c2249 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Mon, 15 Nov 2010 17:30:15 +0100 Subject: reorganised the the common asset helpers module into a class and have it include the id caching module, this class is now shared from the view instance to the asset include tag helpers (js and css) --- .../helpers/asset_tag_helpers/stylesheet_tag_helpers.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb') 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 1289ca383a..d02b28d7f6 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 @@ -1,7 +1,6 @@ require 'active_support/concern' require 'active_support/core_ext/file' require 'action_view/helpers/tag_helper' -require 'action_view/helpers/asset_tag_helpers/common_asset_helpers' require 'action_view/helpers/asset_tag_helpers/asset_include_tag' module ActionView @@ -28,9 +27,9 @@ module ActionView end end + module StylesheetTagHelpers extend ActiveSupport::Concern - include CommonAssetHelpers module ClassMethods # Register one or more stylesheet files to be included when symbol @@ -61,7 +60,7 @@ module ActionView # stylesheet_path "http://www.railsapplication.com/css/style" # => http://www.railsapplication.com/css/style # stylesheet_path "http://www.railsapplication.com/css/style.css" # => http://www.railsapplication.com/css/style.css def stylesheet_path(source) - compute_public_path(source, 'stylesheets', 'css') + asset_paths.compute_public_path(source, 'stylesheets', 'css') end alias_method :path_to_stylesheet, :stylesheet_path # aliased to avoid conflicts with a stylesheet_path named route @@ -134,7 +133,7 @@ module ActionView # stylesheet_link_tag :all, :concat => true # def stylesheet_link_tag(*sources) - @stylesheet_include ||= StylesheetIncludeTag.new(config, controller) + @stylesheet_include ||= StylesheetIncludeTag.new(config, asset_paths) @stylesheet_include.include_tag(*sources) end -- cgit v1.2.3