{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/15211","labels_url":"https://api.github.com/repos/rails/rails/issues/15211/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/15211/comments","events_url":"https://api.github.com/repos/rails/rails/issues/15211/events","html_url":"https://github.com/rails/rails/issues/15211","id":33940184,"number":15211,"title":"ActionView::Helpers::FormHelper#label should provide formatting option","user":{"login":"acurley","id":572840,"avatar_url":"https://avatars.githubusercontent.com/u/572840?v=3","gravatar_id":"","url":"https://api.github.com/users/acurley","html_url":"https://github.com/acurley","followers_url":"https://api.github.com/users/acurley/followers","following_url":"https://api.github.com/users/acurley/following{/other_user}","gists_url":"https://api.github.com/users/acurley/gists{/gist_id}","starred_url":"https://api.github.com/users/acurley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acurley/subscriptions","organizations_url":"https://api.github.com/users/acurley/orgs","repos_url":"https://api.github.com/users/acurley/repos","events_url":"https://api.github.com/users/acurley/events{/privacy}","received_events_url":"https://api.github.com/users/acurley/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-05-20T23:43:03Z","updated_at":"2016-02-01T10:43:16Z","closed_at":"2014-05-20T23:48:20Z","body":"The [default behavior](https://github.com/rails/rails/blob/master/actionview/lib/action_view/helpers/tags/label.rb#L53-L55) 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.\r\n\r\nIn 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`.\r\n\r\nI 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`.  \r\n\r\nIf there are no objections to this, I will submit a pull request to provide the proposed functionality.\r\n"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/177907020","html_url":"https://github.com/rails/rails/issues/15211#issuecomment-177907020","issue_url":"https://api.github.com/repos/rails/rails/issues/15211","id":177907020,"user":{"login":"tomprats","id":1906547,"avatar_url":"https://avatars.githubusercontent.com/u/1906547?v=3","gravatar_id":"","url":"https://api.github.com/users/tomprats","html_url":"https://github.com/tomprats","followers_url":"https://api.github.com/users/tomprats/followers","following_url":"https://api.github.com/users/tomprats/following{/other_user}","gists_url":"https://api.github.com/users/tomprats/gists{/gist_id}","starred_url":"https://api.github.com/users/tomprats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomprats/subscriptions","organizations_url":"https://api.github.com/users/tomprats/orgs","repos_url":"https://api.github.com/users/tomprats/repos","events_url":"https://api.github.com/users/tomprats/events{/privacy}","received_events_url":"https://api.github.com/users/tomprats/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T10:43:16Z","updated_at":"2016-02-01T10:43:16Z","body":"I spent some time investigating it more and it seems like a very easy config to add. Here's a [basic implementation](1).\r\n\r\nI ran into a lot of problems when trying to test it, although due to the default to `:humanize` all the current tests are passing. I figured it wasn't worth wasting much more time on troubleshooting since it probably wouldn't get pulled in until being discussed further\r\n\r\n  [1]: https://github.com/rails/rails/compare/master...tomprats:label-tag-format?expand=1"}}