rails/rails — pull request #5866 by tiegz (2012-04-16 18:06:40+00:00)
Title: Catch nil.to_sym errors in partial_renderer, and raise ArgumentError instead

(Rendering a partial with a path, but missing filename like this...

```render :partial => "templates/subdir/"```

raises this error:

```undefined method `to_sym' for nil:NilClass```

from ```ActionView::PartialRenderer#retrieve_variable``` because it doesn't match the template name regexp. I think instead that method should return ```variable``` as nil instead, raising the ```ArgumentError``` further on instead.

(there's a corresponding pull request for master too: https://github.com/rails/rails/pull/5865)