Permalink
Browse files

javascript_helper now correctly pulls in ajax_helper instead of proto…

…type_helper. prototype_helper is pulled in by ajax_helper for reverse compatibility
  • Loading branch information...
1 parent f115fb0 commit 1cd8b98d0193a298b6fb68443f3d24ccb4aa9447 @erikstmartin erikstmartin committed with stefanpenner Jan 23, 2010
View
4 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 @@ def link_to_remote(name, url, options = {})
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 = {})
View
2 actionpack/lib/action_view/helpers/javascript_helper.rb
@@ -39,7 +39,7 @@ module JavaScriptHelper
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.

0 comments on commit 1cd8b98

Please sign in to comment.