From 9fe845670daa15fac72df826138206471c8398a0 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Tue, 26 Jan 2010 03:00:38 -0500 Subject: adding :href override to link_to_remote --- actionpack/lib/action_view/helpers/ajax_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index e79801c46d..6eba108ff0 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -304,8 +304,10 @@ module ActionView 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 -- cgit v1.2.3