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
This commit is contained in:
Rick Olson
2008-03-07 01:23:12 +00:00
parent d7627361d3
commit 867063134f
2 changed files with 3 additions and 1 deletions

View File

@@ -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]

View File

@@ -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