From e524327e510996ad741ba44c5403fe7353519e40 Mon Sep 17 00:00:00 2001 From: Matthew Eagar Date: Tue, 24 Jan 2017 20:40:34 -0500 Subject: Add partial iteration variable to template keys When rendering heterogeneous collection using `render @collection` or `render partial: @collection`, the expected `_iteration` variable is missing due to `find_template` not having the name of the iteration variable included in its cache keys. --- actionview/test/fixtures/test/_partial_iteration_1.erb | 1 + actionview/test/fixtures/test/_partial_iteration_2.erb | 1 + 2 files changed, 2 insertions(+) create mode 100644 actionview/test/fixtures/test/_partial_iteration_1.erb create mode 100644 actionview/test/fixtures/test/_partial_iteration_2.erb (limited to 'actionview/test/fixtures') diff --git a/actionview/test/fixtures/test/_partial_iteration_1.erb b/actionview/test/fixtures/test/_partial_iteration_1.erb new file mode 100644 index 0000000000..c0fdd4c22a --- /dev/null +++ b/actionview/test/fixtures/test/_partial_iteration_1.erb @@ -0,0 +1 @@ +<%= defined?(partial_iteration_1_iteration) %> diff --git a/actionview/test/fixtures/test/_partial_iteration_2.erb b/actionview/test/fixtures/test/_partial_iteration_2.erb new file mode 100644 index 0000000000..50dd11db27 --- /dev/null +++ b/actionview/test/fixtures/test/_partial_iteration_2.erb @@ -0,0 +1 @@ +<%= defined?(partial_iteration_2_iteration) -%> -- cgit v1.2.3