rails/rails — pull request #5865 by tiegz (2012-04-16 18:04:28+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.