diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-02-16 00:07:52 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-02-16 00:07:52 +0000 |
commit | 86cb0a61fb8e07388fdc026530ce113e93f5272d (patch) | |
tree | fac241c4e7de40261fbd96199499d452e8e37070 /actionpack/lib/action_view/helpers | |
parent | 4ff26f51f61f9bf7d0bb34557e72c1280ee4f859 (diff) | |
download | rails-86cb0a61fb8e07388fdc026530ce113e93f5272d.tar.gz rails-86cb0a61fb8e07388fdc026530ce113e93f5272d.tar.bz2 rails-86cb0a61fb8e07388fdc026530ce113e93f5272d.zip |
Ensure that :confirm doesn't need extra quotes when using drop_receiving_element. Closes #8299 [thechrisoshow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8879 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/scriptaculous_helper.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/scriptaculous_helper.rb b/actionpack/lib/action_view/helpers/scriptaculous_helper.rb index f7a9daf606..69fab27ac8 100644 --- a/actionpack/lib/action_view/helpers/scriptaculous_helper.rb +++ b/actionpack/lib/action_view/helpers/scriptaculous_helper.rb @@ -192,6 +192,9 @@ module ActionView options[:accept] = array_or_string_for_javascript(options[:accept]) if options[:accept] options[:hoverclass] = "'#{options[:hoverclass]}'" if options[:hoverclass] + # Confirmation happens during the onDrop callback, so it can be removed from the options + options.delete(:confirm) if options[:confirm] + %(Droppables.add(#{element_id.to_json}, #{options_for_javascript(options)});) end end |