aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-06-30 18:46:53 +0300
committerMichael Koziarski <michael@koziarski.com>2008-07-03 19:21:04 +0300
commite358b1fce8fdcbac896dde08286be020420e843e (patch)
tree0bc8c93d7503e3e93d8c979d5b4b4fe70ce9617e /actionpack/lib/action_view
parent5501166dec84e1dd63800ea25eaf23290216cf80 (diff)
downloadrails-e358b1fce8fdcbac896dde08286be020420e843e.tar.gz
rails-e358b1fce8fdcbac896dde08286be020420e843e.tar.bz2
rails-e358b1fce8fdcbac896dde08286be020420e843e.zip
Remove old method of including javascripts define_javascript_functions.
javascript_include_tag and friends do a much better job.
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/javascript_helper.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb
index 8caca5b23f..22bd5cb440 100644
--- a/actionpack/lib/action_view/helpers/javascript_helper.rb
+++ b/actionpack/lib/action_view/helpers/javascript_helper.rb
@@ -114,32 +114,6 @@ module ActionView
tag(:input, html_options.merge(:type => 'button', :value => name, :onclick => onclick))
end
- # Includes the Action Pack JavaScript libraries inside a single <script>
- # tag. The function first includes prototype.js and then its core extensions,
- # (determined by filenames starting with "prototype").
- # Afterwards, any additional scripts will be included in undefined order.
- #
- # Note: The recommended approach is to copy the contents of
- # lib/action_view/helpers/javascripts/ into your application's
- # public/javascripts/ directory, and use +javascript_include_tag+ to
- # create remote <script> links.
- def define_javascript_functions
- javascript = "<script type=\"#{Mime::JS}\">"
-
- # load prototype.js and its extensions first
- prototype_libs = Dir.glob(File.join(JAVASCRIPT_PATH, 'prototype*')).sort.reverse
- prototype_libs.each do |filename|
- javascript << "\n" << IO.read(filename)
- end
-
- # load other libraries
- (Dir.glob(File.join(JAVASCRIPT_PATH, '*')) - prototype_libs).each do |filename|
- javascript << "\n" << IO.read(filename)
- end
- javascript << '</script>'
- end
-
-
JS_ESCAPE_MAP = {
'\\' => '\\\\',
'</' => '<\/',