views:

30

answers:

1

Hi,

when I'm using the label helper in a form contex, the label is getting downcased. Can I change this behavior?

example:

<%= f.label "Things Are Getting Big" %>

produce: "Things are getting big" but I want "Things Are Getting Big"

using rails 2.3

+1  A: 

See documentation. First parameter for the label is the name of the field it references, not label's text. If there is no text provided, it uses field's name (localized/humanized)

Your label code produces

<label for="form_record_Things Are Getting Big">Things are getting big</label>

And you possibly need

<label for="form_record_field_name">Things are getting big</label>

You can do that with:

<%= f.label :field_name, "Things Are Getting Big" %>
Voyta