I am trying to format the created_at value of an object for display in
the view.
Just for testing purposes, right now I’m doing -
puts @the_object.created_at.strftime(’%B %e, %G’)
puts @the_object.created_at.to_date.strftime(’%B %e, %G’)
The first line doesn’t output anything, while the second one outputs the
date in the correct format. Why do I have to convert it to a Date object
first? Doesn’t Time have a strftime method?
Thanks!