Format date time in find operation in Rails 3

前端 未结 6 1737
情话喂你
情话喂你 2021-01-28 15:34

I\'m looking for a way to format date time in find(:all) so that when I render my results in JSON, the date time will look like

\"March 20, 2011\"

instead of

6条回答
  •  无人共我
    2021-01-28 16:06

    I would have used Date.parse(datestring) on the client to generate some usable content.

提交回复
热议问题