In my rails 3.0 app I have a set of check_box_tags each with a label. I would like the labels to those check boxes to keep their case.
EG: The 'School/College' label is turned into 'School/college' and any abbreviations such as 'RAAF' is turned into 'Raaf' when used within a check_box_tag. Here is the code I'm using:
%h2 Chaplains
- for chaplain in Chaplain.all
= check_box_tag "clergy[chaplain_ids][]",chaplain.id,@clergy.chaplains.include?(chaplain)
= f.label chaplain.name
%br
You can do one of the following ways to retain the capitalization
= label_tag chaplain.id, chaplain.name
= f.label chaplain.id, chaplain.name
= content_tag :label, chaplain.name
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