Helper caching issue

I have a helper:

def pretty_datetime( dt )
dt.strftime( “%b %d, %Y %I:%m%p” )

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

<%= 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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs