aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorErik St. Martin <alakriti@gmail.com>2010-01-26 03:00:38 -0500
committerStefan Penner <stefan.penner@gmail.com>2010-01-27 12:44:34 -0600
commit9fe845670daa15fac72df826138206471c8398a0 (patch)
tree91298cb41feee6af120cc41f808de4ea5b40c0b7 /actionpack
parent56ae6550b8a7e24bc731f25b66fc3a5d246e221c (diff)
downloadrails-9fe845670daa15fac72df826138206471c8398a0.tar.gz
rails-9fe845670daa15fac72df826138206471c8398a0.tar.bz2
rails-9fe845670daa15fac72df826138206471c8398a0.zip
adding :href override to link_to_remote
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/ajax_helper.rb4
1 files changed, 3 insertions, 1 deletions
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