Forum: Ruby on Rails case/capitalization of LABEL text

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E1479f1fdecd48d824d4358fddecc0a6?d=identicon&s=25 zambezi (Guest)
on 2009-05-14 01: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</
label>

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.

Thanks,
Bill
Ced56202e9039027cfc2da2f70457977?d=identicon&s=25 E. Litwin (Guest)
on 2009-05-14 01: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 = {})
E1479f1fdecd48d824d4358fddecc0a6?d=identicon&s=25 zambezi (Guest)
on 2009-05-14 05:19
(Received via mailing list)
Thank you E. Litwin for bumping me in the right direction.  I'm much
clearer now.

Cheers,
Bill
This topic is locked and can not be replied to.