This project is archived and is in readonly mode.
Fix render :partial to not attempt to render collections that are nil
Reported by Josh Susser | August 18th, 2008 @ 07:27 PM
Attempting the following
render :partial => "foo", :collection => @foos
when @foos is nil and the _foo.html.erb partial does something like foo.name will result in a method_missing because it's trying to call #name on nil. Fixed render :partial to skip rendering the collection when it's nil, just like when it's an empty array.
Comments and changes to this ticket
-
josh August 19th, 2008 @ 05:42 AM
- Milestone cleared.
- State changed from new to open
- Assigned user set to josh
-
josh August 20th, 2008 @ 01:05 AM
- State changed from open to resolved
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>