Using capitalize on FormBuilder#label_for.
mateusg
committed Dec 30, 2011
commit 06b670e5d055eb017c9954de5d507bb931e1242b
Showing 1
changed file with
1 additions
and 1 deletions
comfortable_mexican_sofa/form_builder.rb b/lib/comfortable_mexican_sofa/form_builder.rb
+1
-1
| @@ | @@ -43,7 +43,7 @@ class ComfortableMexicanSofa::FormBuilder < ActionView::Helpers::FormBuilder |
| end | |
| def label_for(field, options={}) | |
| - | label = options.delete(:label) || object.class.human_attribute_name(field) |
| + | label = options.delete(:label) || object.class.human_attribute_name(field).capitalize |
| for_value = options[:id] || "#{object_name}_#{field}" | |
| %Q{<label for="#{for_value}">#{label}</label>}.html_safe | |
| end | |