From d958f22ecc47f34aced7f5619be483d9686a26f0 Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Tue, 22 Nov 2005 23:18:53 +0000 Subject: Make javascript_include_tag :default behave correctly with application.js, fixes #2986 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3164 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/asset_tag_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index c98b7a3638..418092cf88 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -60,7 +60,7 @@ module ActionView def javascript_include_tag(*sources) options = sources.last.is_a?(Hash) ? sources.pop.stringify_keys : { } if sources.first == :defaults - sources = @@javascript_default_sources + sources = @@javascript_default_sources.dup if defined?(RAILS_ROOT) and File.exists?("#{RAILS_ROOT}/public/javascripts/application.js") sources << 'application' end -- cgit v1.2.3