aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2008-03-07 01:23:12 +0000
committerRick Olson <technoweenie@gmail.com>2008-03-07 01:23:12 +0000
commit867063134fb903046d9eac27755a67204a26e148 (patch)
tree9464a548f5aa6f86c49e08c33961e874cf45fbeb /actionpack
parentd7627361d3e5c58653b9777eb81acf70c74bae8b (diff)
downloadrails-867063134fb903046d9eac27755a67204a26e148.tar.gz
rails-867063134fb903046d9eac27755a67204a26e148.tar.bz2
rails-867063134fb903046d9eac27755a67204a26e148.zip
Better error message for type conflicts when parsing params. Closes #7962 [spicycode, matt]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8986 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG2
-rwxr-xr-xactionpack/lib/action_controller/request.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 4f2891577e..7583eb9de2 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Better error message for type conflicts when parsing params. Closes #7962 [spicycode, matt]
+
* Remove unused ActionController::Base.template_class. Closes #10787 [Pratik]
* Moved template handlers related code from ActionView::Base to ActionView::Template. [Pratik]
diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb
index df8dbdc789..f626abf2b0 100755
--- a/actionpack/lib/action_controller/request.rb
+++ b/actionpack/lib/action_controller/request.rb
@@ -690,7 +690,7 @@ module ActionController
end
def type_conflict!(klass, value)
- raise TypeError, "Conflicting types for parameter containers. Expected an instance of #{klass} but found an instance of #{value.class}. This can be caused by colliding Array and Hash parameters like qs[]=value&qs[key]=value."
+ raise TypeError, "Conflicting types for parameter containers. Expected an instance of #{klass} but found an instance of #{value.class}. This can be caused by colliding Array and Hash parameters like qs[]=value&qs[key]=value. (The parameters received were #{value.inspect}.)"
end
end