Sounds good; I'm uploading a new patch. All the tests I wrote pass now, and I added a doc note.
One last thing: I'm wondering if we should add a case for AssociationCollections, so that you can have class CatOwner has_many :cats end render(:partial => @cat_owner.cats) It might look like when ActiveRecord::Associations::AssociationCollection render_partial(partial_path.to_a, local_assigns, deprecated_local_assigns) This doesn't happen automagically, I don't think... Thoughts? Nick On May 25, 9:27 am, DHH <[EMAIL PROTECTED]> wrote: > > I came up with tests; one of them still fails, though: the collection- > > containing-nil one. I'm not really sure what to do with that; anyone > > have any thoughts on what should happen if you try to render :partial > > => nil ? What about render :partial => [nil, a_model] ? My tests > > expect that render :partial => [nil, a_model] is the same as > > render :partial => a_model > > I like just ignoring nil. As in, let it call .compact on the > collection before starting to work with it. Be sure to add this to the > docs, though. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
