aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/ajax_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/helpers/ajax_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/ajax_helper.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb
index 5cb8e96ae6..02245d9a1e 100644
--- a/actionpack/lib/action_view/helpers/ajax_helper.rb
+++ b/actionpack/lib/action_view/helpers/ajax_helper.rb
@@ -37,6 +37,12 @@ module ActionView
attributes.merge!(extract_remote_attributes!(options))
attributes.merge!(options)
+ html["data-update-position"] = options.delete(:position)
+ html["data-method"] = options.delete(:method)
+ html["data-remote"] = "true"
+
+ html.merge!(options)
+
url = url_for(url) if url.is_a?(Hash)
link_to(name, url, attributes)
end