I have MySQL model with created_on specified as :date. This means that
day the record was created on is stored in the database as a string like
“2006-04-28”. I want to be able output a something like “5 days ago”.
looking in the API I’ve found “strftime” and
Distance_of_time_in_words only accepts Time objects and integers, so I
my question is how do I convert “news.send(“created_at”)” to either a
object or a integer? I’ve tried a few things like
but nothing works.
I’m sure that there is probably some helper which will let me do this
I’m not sure what it is.
Any help will be greatly appreciated.