diff options
author | Erik St. Martin <alakriti@gmail.com> | 2010-01-24 09:57:09 -0500 |
---|---|---|
committer | Stefan Penner <stefan.penner@gmail.com> | 2010-01-27 12:44:33 -0600 |
commit | 9821648644e904efcad55961cc7082f574c11414 (patch) | |
tree | 24002a03844dd24655d5c5d923195793664c0066 /actionpack/lib/action_view | |
parent | d7698971713bf42efb12bac10fff0303d5a8ac4e (diff) | |
download | rails-9821648644e904efcad55961cc7082f574c11414.tar.gz rails-9821648644e904efcad55961cc7082f574c11414.tar.bz2 rails-9821648644e904efcad55961cc7082f574c11414.zip |
link_to_remote and button_to_remote now support :confirm
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/ajax_helper.rb | 10 |
1 files changed, 10 insertions, 0 deletions
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) || {} |