Permalink
Browse files

Fix typo on the variable name

  • Loading branch information...
rafaelfranca committed Jul 16, 2014
1 parent 1515569 commit d4df7ce7b356835208141e6ac8e5ffb09ece8401
Showing with 8 additions and 8 deletions.
  1. +8 −8 actionview/lib/action_view/renderer/partial_renderer.rb
@@ -422,16 +422,16 @@ def collection_with_template
layout = find_template(layout, @template_keys)
end
partial_interation = PartialIteration.new(@collection.size)
locals[iteration] = partial_interation
partial_iteration = PartialIteration.new(@collection.size)
locals[iteration] = partial_iteration
@collection.map do |object|
locals[as] = object
locals[counter] = partial_interation.index
locals[counter] = partial_iteration.index
content = template.render(view, locals)
content = layout.render(view, locals) { content } if layout
partial_interation.iterate!
partial_iteration.iterate!
content
end
end
@@ -441,19 +441,19 @@ def collection_without_template
cache = {}
keys = @locals.keys
partial_interation = PartialIteration.new(@collection.size)
partial_iteration = PartialIteration.new(@collection.size)
@collection.map do |object|
index = partial_interation.index
index = partial_iteration.index
path, as, counter, iteration = collection_data[index]
locals[as] = object
locals[counter] = index
locals[iteration] = partial_interation
locals[iteration] = partial_iteration
template = (cache[path] ||= find_template(path, keys + [as, counter]))
content = template.render(view, locals)
partial_interation.iterate!
partial_iteration.iterate!
content
end
end

0 comments on commit d4df7ce

Please sign in to comment.