Rails created_at on display if Today?

Posted by dannymcc on Stack Overflow See other posts from Stack Overflow or by dannymcc
Published on 2010-06-13T14:41:18Z Indexed on 2010/06/13 14:42 UTC
Read the original article Hit count: 211

Filed under:
|
|

Hi Everyone,

Is it possible to display the created_at date, only if that date matches today's date?

<%=h k.created_at %>

Is this possible? Or should it be done in the controller rather than the view?

Thanks,

Danny

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about datetime