rails/rails — pull request #7864 by teleological (2012-10-06 21:34:46+00:00)
Title: Accept :remote as symbol in link_to options

The documentation for UrlHelper#link_to describes a :remote option, which can be set in either the html_options or (url_)options hashes. But the option is checked as a stringified key ('remote'), and only the html_options hash is stringified before this check takes place, so that :remote is ignored if passed in the other hash as a symbol.

This problem exists on 3.2-stable, but an additional issue exists on master: Master passes the options hash to UrlHelper#url_for before consuming and deleting the :remote option. As a result, both the string and symbol forms are used for url-generation before they are used to set the data-remote attribute. This patch also addresses this issue.

I pushed a 3-2 backport to link_to_remote_3_2 in my repository, in case that's useful. Thanks!