cache_digests icon indicating copy to clipboard operation
cache_digests copied to clipboard

dependency not correct when rendering partial from same view tree

Open cpuguy83 opened this issue 13 years ago • 4 comments

With a tree structure as such: views -> tracker -> config_items This dependency:

<%= render 'some_view' %>

Gets calculated as 'tracker/some_view' insead of 'tracker/config_items/some_view'

Explicitly setting the path in the render call as such:

<%= render '/tracker/config_items/some_view' %>

Works correctly.

cpuguy83 avatar Feb 08 '13 15:02 cpuguy83

You can declare dependencies explicitly very easily. The readme is pretty clear that it isn't intended to catch all versions of render and that you'll have to be explicit sometimes.

latortuga avatar Feb 08 '13 15:02 latortuga

Yes, but does that make this not an issue? Also, according to the docs a simple call as shown above should work.

cpuguy83 avatar Feb 08 '13 15:02 cpuguy83

I guess I'm not sure. The easy fix is to be explicit. I can look into writing a fix but I'll defer to @dhh before spending time on it. My guess is that this probably won't be changed due to a) needing to change both Rails master and this gem and b) it being such a small difference that can be mitigated in a well-documented way.

latortuga avatar Feb 08 '13 16:02 latortuga

I'll definitely see if I can get my hands dirty here.

cpuguy83 avatar Feb 08 '13 16:02 cpuguy83