rails/rails — pull request #8623 by virusman (2012-12-26 19:58:14+00:00)
Title: Fixed nested fields bug when called with AssociationProxy

FormBuilder.fields_for_with_nested_attributes (action_view/helpers/form_helper.rb):
This part of code expected associations to be arrays and was never executed since associations are now CollectionProxy instead of Array.
```ruby
if association.respond_to?(:persisted?)
association = [association] if @object.send(association_name).is_a?(Array)
```
Test is included