diff options
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/renderer/partial_renderer.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionview/lib/action_view/renderer/partial_renderer.rb b/actionview/lib/action_view/renderer/partial_renderer.rb index c2b6e6a290..7c2e07185c 100644 --- a/actionview/lib/action_view/renderer/partial_renderer.rb +++ b/actionview/lib/action_view/renderer/partial_renderer.rb @@ -403,9 +403,8 @@ module ActionView def collection_from_options if @options.key?(:collection) - collection = @options[:collection] || [] - collection = collection.to_ary if collection.respond_to?(:to_ary) - collection + collection = @options[:collection] + collection ? collection.to_a : [] end end |