Permalink
Browse files

Inspect options hashes in RenderError message so it's actually readab…

…le. Closes #11435 [court3nay]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9123 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent c00de99 commit 18049864cbe4bbdfd7eb0e96238877bfe74d79fd @jeremy jeremy committed Mar 28, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_controller/base.rb
@@ -836,12 +836,12 @@ def render(options = nil, extra_options = {}, &block) #:doc:
if options.nil?
return render_for_file(default_template_name, nil, true)
elsif !extra_options.is_a?(Hash)
- raise RenderError, "You called render with invalid options : #{options}, #{extra_options}"
+ raise RenderError, "You called render with invalid options : #{options.inspect}, #{extra_options.inspect}"
else
if options == :update
options = extra_options.merge({ :update => true })
elsif !options.is_a?(Hash)
- raise RenderError, "You called render with invalid options : #{options}"
+ raise RenderError, "You called render with invalid options : #{options.inspect}"
end
end

0 comments on commit 1804986

Please sign in to comment.