Skip to content

Commit

Permalink
adding :href override to link_to_remote
Browse files Browse the repository at this point in the history
  • Loading branch information
erikstmartin authored and stefanpenner committed Jan 27, 2010
1 parent 56ae655 commit 9fe8456
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion actionpack/lib/action_view/helpers/ajax_helper.rb
Expand Up @@ -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
Expand Down

0 comments on commit 9fe8456

Please sign in to comment.