diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2010-11-15 17:30:15 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-16 00:04:37 +0100 |
commit | 0ff1c5935f84f86a8b88802078b115e9964c2249 (patch) | |
tree | 5f017e7a71647c850d2a9e4bea04f3e860ef73a1 /actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb | |
parent | 6a609dbc82d03eb92a85970aa157192657f14882 (diff) | |
download | rails-0ff1c5935f84f86a8b88802078b115e9964c2249.tar.gz rails-0ff1c5935f84f86a8b88802078b115e9964c2249.tar.bz2 rails-0ff1c5935f84f86a8b88802078b115e9964c2249.zip |
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)
Diffstat (limited to 'actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb | 7 |
1 files changed, 3 insertions, 4 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 72615220fa..6581e1d6f2 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 @@ -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 @@ -43,9 +42,9 @@ module ActionView end end + module JavascriptTagHelpers extend ActiveSupport::Concern - include CommonAssetHelpers module ClassMethods # Register one or more javascript files to be included when <tt>symbol</tt> @@ -76,7 +75,7 @@ module ActionView # javascript_path "http://www.railsapplication.com/js/xmlhr" # => http://www.railsapplication.com/js/xmlhr # javascript_path "http://www.railsapplication.com/js/xmlhr.js" # => http://www.railsapplication.com/js/xmlhr.js def javascript_path(source) - compute_public_path(source, 'javascripts', 'js') + asset_paths.compute_public_path(source, 'javascripts', 'js') end alias_method :path_to_javascript, :javascript_path # aliased to avoid conflicts with a javascript_path named route @@ -163,7 +162,7 @@ module ActionView # # javascript_include_tag :all, :cache => true, :recursive => true def javascript_include_tag(*sources) - @javascript_include ||= JavascriptIncludeTag.new(config, controller) + @javascript_include ||= JavascriptIncludeTag.new(config, asset_paths) @javascript_include.include_tag(*sources) end |