Case/capitalization of LABEL text

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 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.


You could call it like this:
<%= label(:country, :name, “USA”) %>

This is the method interface:
label(object_name, method, text = nil, options = {})

Thank you E. Litwin for bumping me in the right direction. I’m much
clearer now.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs