This project is archived and is in readonly mode.
helper caching issue
-
thedarkone
Can you create smallish 1 controller 1 helper app on github to demonstrate the issue?
-
CancelProfileIsBroken
- Tag changed from 2.3.2, helper to 2.3.2, bugmash, helper
-
Nick Quaranto
Invalid. First off, I think because you're trying to display
updated_at, when you edit it, ActiveRecord tries to update it like it's a timestamp. Also, I think this is not the best way to show a custom date format. You should instead set a custom format in an initializer, like so:ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!( :my_custom_format => “%A %B %d, %Y” )Then in your view:
@user.updated_at.to_formatted_s(:my_custom_format) -
Kieran P
-1 I agree with Nick. I've never run into this issue with apps I've worked on, and using active support is much better suited to this task than cluttering your helpers. Double check the method isn't memoized either.
-
Rizwan Reza
not reproducible
-1 Agreed with Nick. The problem lies in defining that pretty_datetime. Invalid.
-
Elad Meidar
-1 was unable to reproduce. I agree with nick, use of #to_s with a custom format is probably the consist way to approach this.
-
Dan Croak
-1 should use date conversions
-
CancelProfileIsBroken
- State changed from new to invalid
- Tag changed from 2.3.2, bugmash, helper to 2.3.2, helper