aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorErik St. Martin <alakriti@gmail.com>2010-01-23 12:37:54 -0500
committerStefan Penner <stefan.penner@gmail.com>2010-01-27 12:44:32 -0600
commit1cd8b98d0193a298b6fb68443f3d24ccb4aa9447 (patch)
tree7a1ec7fa5f8896dcaf70024bf59bbd3fb003fe27 /actionpack
parentf115fb011169cadfd1977c7e6d6ddef2eecc96de (diff)
downloadrails-1cd8b98d0193a298b6fb68443f3d24ccb4aa9447.tar.gz
rails-1cd8b98d0193a298b6fb68443f3d24ccb4aa9447.tar.bz2
rails-1cd8b98d0193a298b6fb68443f3d24ccb4aa9447.zip
javascript_helper now correctly pulls in ajax_helper instead of prototype_helper. prototype_helper is pulled in by ajax_helper for reverse compatibility
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/ajax_helper.rb4
-rw-r--r--actionpack/lib/action_view/helpers/javascript_helper.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb
index 4081117ad1..9c1d6a722d 100644
--- a/actionpack/lib/action_view/helpers/ajax_helper.rb
+++ b/actionpack/lib/action_view/helpers/ajax_helper.rb
@@ -1,7 +1,7 @@
module ActionView
module Helpers
module AjaxHelper
- include UrlHelper
+ include PrototypeHelper
def remote_form_for(record_or_name_or_array, *args, &proc)
options = args.extract_options!
@@ -28,7 +28,7 @@ module ActionView
attributes.merge!(options)
url = url_for(url) if url.is_a?(Hash)
- link_to(name, url, attributes)
+ content_tag(:a, name, attributes.merge(:href => url))
end
def button_to_remote(name, options = {}, html_options = {})
diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb
index 8f64acf102..9f6ec28a9e 100644
--- a/actionpack/lib/action_view/helpers/javascript_helper.rb
+++ b/actionpack/lib/action_view/helpers/javascript_helper.rb
@@ -39,7 +39,7 @@ module ActionView
JAVASCRIPT_PATH = File.join(File.dirname(__FILE__), 'javascripts')
end
- include PrototypeHelper
+ include AjaxHelper::Rails2Compatibility
# Returns a link of the given +name+ that will trigger a JavaScript +function+ using the
# onclick handler and return false after the fact.