# Helper caching issue

**URL:** <https://www.ruby-forum.com/t/helper-caching-issue/163995>\
**Category:** Rails\
**Created:** [March 26, 2009, 6:37pm UTC](https://www.ruby-forum.com/t/helper-caching-issue/163995 "2009-03-26T18:37:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![destiney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f07891/32.png) [@destiney](https://www.ruby-forum.com/u/destiney)\
**Post date:** [March 26, 2009, 6:37pm UTC](https://www.ruby-forum.com/t/helper-caching-issue/163995/1 "2009-03-26T18:37:36Z")

</div>

I have a helper:

def pretty\_datetime( dt )  
dt.strftime( “%b %d, %Y %I:%m%p” )  
end

and I have a partial that uses the helper like this:

\<%= pretty\_datetime alert.updated\_at %\>

The problem is when I update the record the previous updated\_at value  
is still being displayed.

When I don’t use the helper I see the updated\_at value change every  
time.

\<%= alert.updated\_at %\>

When I put the helper call back again, the partial again shows me the  
previous updated\_at value, even after multiple updates and me taking  
it away and putting it back multiple times. Even if I restart the  
server I’m still seeing the old updated\_at values from when the record  
was first created. I see the values changing in the database when I  
update the record so I know the problem isn’t there.

So why is the output of my helper (or partial) being cached?

This is in development mode, Rails 2.3.2.

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)
