1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix warning in AV tests

Originally caused by #17771
This commit is contained in:
Sean Griffin 2014-11-25 15:57:00 -07:00
parent 3802de4a76
commit 2f8be7ebaf

View file

@ -366,10 +366,12 @@ module ActionView
partial = options[:partial]
if String === partial
@object = options[:object] if options.has_key?(:object)
@has_object = options.key?(:object)
@object = options[:object]
@collection = collection_from_options
@path = partial
else
@has_object = true
@object = partial
@collection = collection_from_object || collection_from_options
@ -506,7 +508,7 @@ module ActionView
def retrieve_template_keys
keys = @locals.keys
keys << @variable if defined?(@object) || @collection
keys << @variable if @has_object || @collection
if @collection
keys << @variable_counter
keys << @variable_iteration