The default behavior for generating label text in a form is to utilize Model.human_attribute_name(:attribute)
. This decision, and it’s potential downsides, are referenced in #6489.
In many cases I would prefer to use another ActiveSupport::Inflector
(perhaps titleize
)
but cannot do this. I would either have to hard code the value into the label tag or enumerate the value in my locale. Both are inefficient
given that I am content with the output provided by ActiveSupport::Inflector#titleize
.
I would like to see ActionView::Helpers::Tags::Label
support the use of a format option that would provide an Inflector transformation of the attribute. So as to not alter existing forms, the
default behavior should continue to use human_attribute_name
.
Does anyone else see potential value in this feature?