I have the following:
@comment.created_at.strftime("%I:%M %p %b %d")
Which outputs: 10:32 AM Dec 19
I'd like to output a lowercase am, like: 10:32am Dec 19
Any ideas on how to do that with ruby/rails?
thanks
Try to use %P instead using %p
I am getting the error undefined method `strftime' for "2013-03-06":String when trying to display a date normally (June Sunday 3, 2013 or something similar) from the string 2013-03-06 using strftime. The line that does this in my index.html.…
How do I generate a random number between 0 and n?
I wrongly named a column hased_password instead of hashed_password. How do I update the database schema, using migration to rename this column?