aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2013-01-11 03:08:41 -0800
committerJon Leighton <j@jonathanleighton.com>2013-01-11 03:08:41 -0800
commit94797ed146ba02f627a365293e46b6e8c42a4fd7 (patch)
treebd2694f809a00fb947abea49e9fc8955446e41f8 /actionpack/lib/action_view/helpers
parent15b7482dfcf4285f6a0278671dcb67f2c6b0132d (diff)
parentc009e86fe12cb04e4359ce5ec063364561a6252c (diff)
downloadrails-94797ed146ba02f627a365293e46b6e8c42a4fd7.tar.gz
rails-94797ed146ba02f627a365293e46b6e8c42a4fd7.tar.bz2
rails-94797ed146ba02f627a365293e46b6e8c42a4fd7.zip
Merge pull request #8623 from virusman/form_helpers_collectionproxy_fix
Fixed nested fields bug when called with AssociationProxy
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 50f1eff4ec..4a31de715d 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -1800,7 +1800,7 @@ module ActionView
association = convert_to_model(association)
if association.respond_to?(:persisted?)
- association = [association] if @object.send(association_name).is_a?(Array)
+ association = [association] if @object.send(association_name).respond_to?(:to_ary)
elsif !association.respond_to?(:to_ary)
association = @object.send(association_name)
end