diff options
-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 |