aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/asset_tag_helper.rb
diff options
context:
space:
mode:
authorThomas Fuchs <thomas@fesch.at>2005-09-28 08:20:47 +0000
committerThomas Fuchs <thomas@fesch.at>2005-09-28 08:20:47 +0000
commit516dc2c0f16cf187f981b5e8648a7f7f1b31d190 (patch)
treed645e19a02ab5eb371302fe4742b7fd7e0a1a1e2 /actionpack/lib/action_view/helpers/asset_tag_helper.rb
parentdd21e9ae39a2dc4b7eb607ff2c200c864fa19b28 (diff)
downloadrails-516dc2c0f16cf187f981b5e8648a7f7f1b31d190.tar.gz
rails-516dc2c0f16cf187f981b5e8648a7f7f1b31d190.tar.bz2
rails-516dc2c0f16cf187f981b5e8648a7f7f1b31d190.zip
Update script.aculo.us to 1.5_rc2, and Prototype to 1.4.0_pre7
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2386 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/helpers/asset_tag_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
index b5f630aae0..61a0f0b45a 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -51,7 +51,12 @@ module ActionView
# <script type="text/javascript" src="/javascripts/dragdrop.js"></script>
def javascript_include_tag(*sources)
options = sources.last.is_a?(Hash) ? sources.pop.stringify_keys : { }
- sources = ['prototype', 'effects', 'controls', 'dragdrop'] if sources.first == :defaults
+ if sources.first == :defaults
+ sources = ['prototype', 'scriptaculous']
+ if defined?(RAILS_ROOT) and File.exists?("#{RAILS_ROOT}/public/javascripts/application.js")
+ sources << 'application'
+ end
+ end
sources.collect { |source|
source = javascript_path(source)
content_tag("script", "", { "type" => "text/javascript", "src" => source }.merge(options))