# Why is my partial being skipped/cached?

**URL:** <https://www.ruby-forum.com/t/why-is-my-partial-being-skipped-cached/136872>\
**Category:** Rails\
**Created:** [May 7, 2008, 1:16am UTC](https://www.ruby-forum.com/t/why-is-my-partial-being-skipped-cached/136872 "2008-05-07T01:16:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael\_teter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47c2d/32.png) [@michael\_teter](https://www.ruby-forum.com/u/michael_teter)\
**Post date:** [May 7, 2008, 1:16am UTC](https://www.ruby-forum.com/t/why-is-my-partial-being-skipped-cached/136872/1 "2008-05-07T01:16:04Z")

</div>

Howdy.

I’ve got a controller action that calls  
render :template =\> “my\_view/errors”

errors.rhtml simply renders a partial  
\<%= render(:partial =\> ‘error\_list\_section’) %\>

\_error\_list\_section.rhtml does a few things, and renders another  
partial:  
\<%= render(:partial =\> ‘my\_view/date\_range\_section’) %\>

PROBLEM:  
\_date\_range\_section.rhtml only seems to be called once, the first time  
I hit the page. Subsequent calls to this page (with varying  
parameters) do run through \_error\_list\_section.rhtml, but they don’t  
seem to run through \_date\_range\_section.

I’m using NetBeans IDE, running WEBrick in debug mode (in JRuby). I  
have breakpoints set at the call to render partial for the date  
section, and I also have breakpoints in the partial itself.

I hit the breakpoints the first time I view the page, but any further  
calls to the page (with different “?month=4” don’t stop me inside the  
partial. It really appears that the render partial  
\_date\_range\_section is just not being processed.

Any ideas?

Thanks much.  
Michael

---

<div class="post-metadata">

**Author:** ![michael\_teter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47c2d/32.png) [@michael\_teter](https://www.ruby-forum.com/u/michael_teter)\
**Post date:** [May 7, 2008, 1:27am UTC](https://www.ruby-forum.com/t/why-is-my-partial-being-skipped-cached/136872/2 "2008-05-07T01:27:11Z")

</div>

Well, it seems my code was being executed (it had to have been, but  
the debugger sure didn’t want to show me!)

After adding many more breakpoints, apparently I found a position in  
the partial where a breakpoint was valid. Now why the breakpoint in  
the parent that was calling the render :partial wouldn’t allow me to  
step into, I don’t know.

So, disregard this post. Sorry.
