Content
View differences
Updated by Oliver Günther over 1 year ago
In development and test mode, we want to raise an error when trying to use `human_attribute_name`, but no I18n key is found for the attribute. Rails falls back to `.humanize` without a way to raise an error here, resulting in us forgetting I18n keys time and time again.
By patching `#humanize` only on the attribute that is provided into human\_attribute\_name, we can keep our patch very specific
As a side effect, this changes some specs to not use bogus keys where possible, or stubs the expected keys.
By patching `#humanize` only on the attribute that is provided into human\_attribute\_name, we can keep our patch very specific
As a side effect, this changes some specs to not use bogus keys where possible, or stubs the expected keys.