John Doe
John Doe

Reputation: 33

SimpleForm label capitalizes my text. How to prevent?

I use simple_form gem and I have the following code:

= f.label f.object.name

Where f is a simple_form object created via simple_form_for(...) do |f|

But if name returns something like SOME WORD it generates capitalized text: Some word.

How to prevent it and generate text as is?

Upvotes: 3

Views: 474

Answers (1)

W4rQCC1yGh
W4rQCC1yGh

Reputation: 2219

I found a similar ruby-forum topic. I tested it and it works in my simple_form

Basically you should add a second parameter like this:

= f.label :name, f.object.name
= f.input :name

Upvotes: 2

Related Questions