Read the documentation for label method:
http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#M002292
You can also do a view source to see the Rails source code in the docs. My
guess is that it is calling humanize method to convert the text to camel
case.
On Sun, Jul 18, 2010 at 12:59 AM, Abder-Rahman Ali
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:
> In the new.html.erb file, when you have a :title field for example, you
> will find the following:
>
> <%= f.label :title %><
>
> When you view this page, you will find that the label is written as:
> Title
>
> Does Rails convert the field in this form with a capitalized first
> letter.
>
> I tried for example to change :title in the above script to Title
> immediately, but got an error.
>
> Does that mean I have to leave it as is and Rails will handle the look
> of the field?
>
> Thanks.
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
Cheers,
Bala
RoR Developer Now Available for Hire
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.