diff options
author | Erik St. Martin <alakriti@gmail.com> | 2010-01-26 03:00:38 -0500 |
---|---|---|
committer | Stefan Penner <stefan.penner@gmail.com> | 2010-01-27 12:44:34 -0600 |
commit | 9fe845670daa15fac72df826138206471c8398a0 (patch) | |
tree | 91298cb41feee6af120cc41f808de4ea5b40c0b7 /actionpack/lib/action_view/helpers | |
parent | 56ae6550b8a7e24bc731f25b66fc3a5d246e221c (diff) | |
download | rails-9fe845670daa15fac72df826138206471c8398a0.tar.gz rails-9fe845670daa15fac72df826138206471c8398a0.tar.bz2 rails-9fe845670daa15fac72df826138206471c8398a0.zip |
adding :href override to link_to_remote
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/ajax_helper.rb | 4 |
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 |