From 9821648644e904efcad55961cc7082f574c11414 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sun, 24 Jan 2010 09:57:09 -0500 Subject: link_to_remote and button_to_remote now support :confirm --- actionpack/lib/action_view/helpers/ajax_helper.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/helpers/ajax_helper.rb b/actionpack/lib/action_view/helpers/ajax_helper.rb index 7e7d4a0557..5a9c4e7386 100644 --- a/actionpack/lib/action_view/helpers/ajax_helper.rb +++ b/actionpack/lib/action_view/helpers/ajax_helper.rb @@ -493,6 +493,16 @@ module ActionView private + def extract_confirm_attributes!(options) + attributes = {} + + if options && options[:confirm] + attributes["data-confirm"] = options.delete(:confirm) + end + + attributes + end + def extract_remote_attributes!(options) attributes = options.delete(:html) || {} -- cgit v1.2.3