aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorRiley <bx+github@teleological.net>2012-10-06 16:14:28 -0400
committerRiley Lynch <oss@teleological.net>2012-10-06 17:23:04 -0400
commit380800e4a272db98f3dd267f82e0ce1e4d03f4b8 (patch)
tree019af1195750d4dc4049c018f313d5402314e27f /actionpack/lib/action_view
parent92d761237ea9372fefd2c4e514f7f8290eb28d1e (diff)
downloadrails-380800e4a272db98f3dd267f82e0ce1e4d03f4b8.tar.gz
rails-380800e4a272db98f3dd267f82e0ce1e4d03f4b8.tar.bz2
rails-380800e4a272db98f3dd267f82e0ce1e4d03f4b8.zip
Accept :remote as symbol in link_to options
Accept either :remote or 'remote' in both the html_options and (url_)options hash arguments to link_to.
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index 1f1cd3cee3..812bb4de9e 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -633,7 +633,9 @@ module ActionView
end
def link_to_remote_options?(options)
- options.is_a?(Hash) && options.key?('remote') && options.delete('remote')
+ if options.is_a?(Hash)
+ options.delete('remote') || options.delete(:remote)
+ end
end
def add_method_to_attributes!(html_options, method)