I have the code below in one of my views but it always renders as Home page url. How can I stop it from changing the case?
<%= f.label "Home Page URL" %><br />
<%= f.label :home_page_url, "Home Page URL" %><br />
Silly, I know, but that'll do it.
The first parm after f.label should actually be the method of the object being edited, so you've probably got that wrong. I'm assuming the method (field name) is actually "home_page_url" in my rewrite above. The second parm, optional, will override Rails' default case-ing of the method name - that's where you want to put in your properly-cased label.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With