The <partial_name>_iteration
local is missing when rendering heterogeneous collections
#27794
Labels
<partial_name>_iteration
local is missing when rendering heterogeneous collections
#27794
Steps to reproduce
to_partial_path
, such as a set of ActiveRecord models in an STI hierarchy, and assign it to@collection
render @collection
orrender partial: @collection
<template_name>_iteration
in the rendered partial, and find that it isn't definedSee https://github.com/meagar/partial-iteration-test for a simple POC, specifically the commit that introduces the bug and screenshots of the broken/expected behavior.
Expected behavior
A variable named
<partial_name>_iteration
should be set to an instance ofActionView::PartialIteration
Actual behavior
The variable is unset
System configuration
Rails version:
Rails 5.0.1
Ruby version:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
The text was updated successfully, but these errors were encountered: