Problem with start_remote_link_tag in Rails helper
Brought to you by:
kwatch
The code for the start_remote_link_tag in the Rails helper is:
##
## ajax version of start_link_tag()
##
def start_remote_link_tag(options={}, html_options={})
<b>s = link_to_remote(options, html_options)</b>
s.sub!(/<\/a>\z/, '')
s
end
alias anchor start_link_tag
alias anchor_remote start_remote_link_tag
It should be:
##
## ajax version of start_link_tag()
##
def start_remote_link_tag(options={}, html_options={})
<b>s = link_to_remote('', options, html_options)</b>
s.sub!(/<\/a>\z/, '')
s
end
alias anchor start_link_tag
alias anchor_remote start_remote_link_tag
The line of interest is the one where the link_to_remote is assigned to s. The first parameter to the call should be an empty string.