how do i get name of the month in ruby on Rails?
Posted
by necker
on Stack Overflow
See other posts from Stack Overflow
or by necker
Published on 2010-06-11T11:00:43Z
Indexed on
2010/06/11
11:13 UTC
Read the original article
Hit count: 184
ruby-on-rails
|ruby
so i create in my view:
<%=date=Date.today%>
How do i get the name of the month out of the date? I was trying to do sth like
<%= DATE::ABBR_MONTHNAMES(date.month)%>
But without success. I keep getting an error: uninitialized constant ActionView::Base::CompiledTemplates::MONTHNAMES
How do i initialise the constant or is there any other way to get the name out of the Date format?
would greatly appreciate any answers!
© Stack Overflow or respective owner