Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

dependency not correct when rendering partial from same view tree #33

Open
cpuguy83 opened this issue Feb 8, 2013 · 4 comments
Open

Comments

@cpuguy83
Copy link

cpuguy83 commented Feb 8, 2013

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.

@latortuga
Copy link
Contributor

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.

@cpuguy83
Copy link
Author

cpuguy83 commented Feb 8, 2013

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

@latortuga
Copy link
Contributor

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.

@cpuguy83
Copy link
Author

cpuguy83 commented Feb 8, 2013

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants