aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-01-10 22:46:45 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-01-10 22:46:45 +0000
commitebf424061dba2454b3e1d746e2515b10e76a5be8 (patch)
tree6a6ae10a618a0cbe7d34e72564bc11760333628b /actionpack
parent7ed4b745fcd2c57747ed21ffa3a7a0cd92f621af (diff)
downloadrails-ebf424061dba2454b3e1d746e2515b10e76a5be8.tar.gz
rails-ebf424061dba2454b3e1d746e2515b10e76a5be8.tar.bz2
rails-ebf424061dba2454b3e1d746e2515b10e76a5be8.zip
Fixed three issues with retrying breakpoints #417 [Florian Gross]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@370 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG7
-rw-r--r--actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml11
2 files changed, 14 insertions, 4 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index d43ada01f0..e04113746c 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,12 @@
*SVN*
+* Fixed three issues with retrying breakpoints #417 [Florian Gross]
+
+ 1. Don't screw up pages that use multiple values for the same parameter (?foo=bar&foo=qux was converted to ?foo=barqux)
+ 2. Don't screw up all forms when you click the "Retry with Breakpoint" link multiple times instead of reloading
+ (This caused the parameters to be added multiple times for GET forms leading to trouble.)
+ 3. Don't add ?BP-RETRY=1 multiple times
+
* Added that all renders and redirects now return false, so they can be used as the last line in before_filters to stop execution.
Before:
diff --git a/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml b/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml
index afdd19c6c1..aaeebba6f4 100644
--- a/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml
+++ b/actionpack/lib/action_controller/templates/rescues/_request_and_response.rhtml
@@ -1,10 +1,13 @@
<% if defined?(Breakpoint) %>
<br /><br />
- <%= form_tag({}, "method" => @request.method) %>
+ <%= form_tag({:params => {}, :only_path => true}, "method" => @request.method) %>
<input type="hidden" name="BP-RETRY" value="1" />
-
- <% for key, value in @request.params %>
- <input type="hidden" name="<%= key %>" value="<%= value %>" />
+
+ <% for key, values in @params %>
+ <% next if key == "BP-RETRY" %>
+ <% for value in Array(values) %>
+ <input type="hidden" name="<%= key %>" value="<%= value %>" />
+ <% end %>
<% end %>
<input type="submit" value="Retry with Breakpoint" />