mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
parent
3802de4a76
commit
2f8be7ebaf
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue