I have an attribute in my user database of type “Date”.
I want to show it in the “show view”, in any format.
What shall I write in show.html.erb so that I can see the contents of this field of a user object ?
Thanks 🙂
I have an attribute in my user database of type Date. I want to
Share
You might want to store the date format in a config file and/or a helper so you can easily modify it and use it globally wherever you are printing it in a view.
You can print a date like this:
See this article where the date formats are listed and there is more information on the subject:
http://www.linux-mag.com/id/4070/