Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding :href override to link_to_remote

  • Loading branch information...
commit 9fe845670daa15fac72df826138206471c8398a0 1 parent 56ae655
@erikstmartin erikstmartin authored stefanpenner committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 actionpack/lib/action_view/helpers/ajax_helper.rb
View
4 actionpack/lib/action_view/helpers/ajax_helper.rb
@@ -304,8 +304,10 @@ def link_to_remote(name, options, html_options = {})
end
attributes.merge!(html_options)
+ href = options[:href].nil? ? "#" : options[:href]
+ attributes.merge!(:href => href)
- content_tag(:a, name, attributes.merge(:href => "#"))
+ content_tag(:a, name, attributes)
end
# Creates a button with an onclick event which calls a remote action
Please sign in to comment.
Something went wrong with that request. Please try again.