render :partial :collection fails in Rails 2.1
Reported by Robert Thau | July 10th, 2008 @ 11:09 PM
Hi. I just ran into some apparent misbehavior in
your inherit_views plugin under Rails 2.1. A
<% render :partial => 'partial', :collection => ... %>
was no longer searching up the inheritance
chain, perhaps because the internal routine
'render_partial_collection' was not calling
'render_partial', but rather locating and
instantiating the template itself (well, via
one of two private helper routines).
What's attached is my quick stab at a patch
Comments and changes to this ticket
-
Ian White September 21st, 2008 @ 01:48 AM
(from [9dd29e557965f7d0a4e900e83030c690386c26fe]) Added specs for [#1] No failures yet http://github.com/ianwhite/inher...
-
Ian White September 21st, 2008 @ 01:52 AM
- State changed from new to open
Hi Robert, so sorry this has taken so long
I;ve added some specs testing this, but am not getting the failure on 2.1 - could you look at them http://github.com/ianwhite/inher...
and tell me if I'm testing the right thing?
Summary:
if i have
sub/_partial.html.erb sub/render_it.html.erb super/_partial.html.erb render_it.html.erb: <%= render :partial => 'partial', :collection => [1,2,3] %>
when rendered from sub it renders 3 of the sub/_partial
when rendered from super it renders 3 of the super/_partial
Is this the aberrant stuff, or some other behaviour?
Cheers, Ian
-
Ian White November 25th, 2008 @ 01:20 AM
- State changed from open to resolved
I believe this is fixed.
-
PedroEffler October 20th, 2024 @ 09:13 AM
Great for running! Lightweight pink palm puff hoodie and has good pockets.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
inherit_views enables inheritance of views along a controller class heirachy
People watching this ticket
Attachments
Referenced by
- 1 render :partial :collection fails in Rails 2.1 (from [9dd29e557965f7d0a4e900e83030c690386c26fe]) Added s...