This is probably a bit low question, but is there any elegant way, how to change the label-text in label helper?
= f.label :name
generate
<input id="car_name" name="car[name]" size="30" type="text">
If I would like to have the text in label, say, Your Car instead of Name, how to do that?
One way is to write the label tag directly as HTML, but this is a bit dirty way...
Just add a second string argument to f.label, like this:
label_tag 'name', 'Your name'
# => <label for="name">Your Name</label>
See here
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