rails/rails — pull request #8402 by senny (2012-12-02 15:30:35+00:00)
Title: More descriptive error when rendering a partial with `:layout => true`

This change was motivated by the stack trace from #8376. The error describes the problem poorly. Since calling `render` with `:layout => true` is valid for templates, I can see beginners making the mistake to make such a call to render a partial.

Since the `:layout` argument for partials must be a string, I made this explicit in the code. This raises more descriptive error messages when invalid arguments like `:layout => true` are passed.