Agile Web Development with Rails 7: Payment labels should keep the object name when adding i18n labels (pages 238-239)

When internationalizing the payment type forms, the labels should keep the object name so that the “for” attribute is set correctly on the label.

ie. should be:

<%= form.label :credit_card_number, t('.cc_number') %>
<%= form.password_field :credit_card_number, class: "input-field" %>

instead of

<%= form.label t('.cc_number') %>
<%= form.password_field :credit_card_number, class: "input-field" %>