Forum: Ruby on Rails case/capitalization of LABEL text

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
zambezi (Guest)
on 2009-05-14 03:06
(Received via mailing list)
I've noticed that when using the form method Label, that the label
text is translated to html with the first character in Upper Case and
the remainder of the text string as lower case.

<%= label(:country, "USA") %>  becomes  <label for="country_USA">Usa</

I can't find any documentation on this unhelpful behavior.  Is there
anyway way to override it and keep the text string in proper case.

E. Litwin (Guest)
on 2009-05-14 03:35
(Received via mailing list)
You could call it like this:
<%= label(:country, :name, "USA") %>

This is the method interface:
label(object_name, method, text = nil, options = {})
zambezi (Guest)
on 2009-05-14 07:19
(Received via mailing list)
Thank you E. Litwin for bumping me in the right direction.  I'm much
clearer now.

This topic is locked and can not be replied to.