Skip to content

Commit

Permalink
Added :confirm option to link_to_remote just like link_to has #1082 […
Browse files Browse the repository at this point in the history
…yrashk@fp.org.ua]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Apr 13, 2005
1 parent 908e9a1 commit 2ad8dc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
3 changes: 2 additions & 1 deletion actionpack/lib/action_view/helpers/javascript_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2ad8dc6

Please sign in to comment.