Rails - using capitalize on a month name from l18n -


i have string in view

<%= l event.start_date, format: :long %> 

which outputs

18 aout 2013

i capitalize month name without touching yaml file, , tried several options failed miserably. possible?

if call capitalize takes first character, may use titleize

<%=(l date.today, format: :long) %> => "miƩrcoles, 28 de agosto de 2013" <%=(l date.today, format: :long).titleize  %> => "miƩrcoles, 28 de agosto de 2013" 

please note words turned capital letter

update
$ rails c loading development environment (rails 4.0.0) >> helper.l date.today, format: :long => "september 02, 2013" >> helper.l time.now, format: :long => "september 02, 2013 22:56" 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -