Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added :confirm option to link_to_remote just like link_to has #1082 […

…yrashk@fp.org.ua]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 2ad8dc6a1f805315d4a1173fe988e15098c59364 1 parent 908e9a1
David Heinemeier Hansson dhh authored
2  actionpack/CHANGELOG
View
@@ -1,5 +1,7 @@
*SVN*
+* Added :confirm option to link_to_remote just like link_to has #1082 [yrashk@fp.org.ua]
+
* Added minute_step as an option to select_minute (and the helpers that use it) to jump in larger increments than just 1 minute. At 15, it would return 0, 15, 30, 45 options #1085 [ordwaye@evergreen.edu]
* Fixed that an exception would be thrown when an empty form was submitted #1090 [jan@ulbrich-boerwang.de]
3  actionpack/lib/action_view/helpers/javascript_helper.rb
View
@@ -106,7 +106,8 @@ def remote_function(options) #:nodoc: for now
function = "#{options[:before]}; #{function}" if options[:before]
function = "#{function}; #{options[:after]}" if options[:after]
function = "if (#{options[:condition]}) { #{function}; }" if options[:condition]
-
+ function = "if (confirm('#{escape_javascript(options[:confirm])}')) { #{function}; }" if options[:confirm]
+
return function
end
Please sign in to comment.
Something went wrong with that request. Please try again.