Skip to content

Instantly share code, notes, and snippets.

@woods
Created August 5, 2013 20:29
Show Gist options
  • Save woods/6159329 to your computer and use it in GitHub Desktop.
Save woods/6159329 to your computer and use it in GitHub Desktop.
An example of how to specify attribute-to-English mappings for custom objects to pass to form_for. This file shows the mapping for a "payment" object. Note that it does not have to be an ActiveRecord.
en:
helpers:
label:
payment:
first_name: First Name
last_name: Last Name
email: Email
company: Company
card_number: Credit Card Number
card_expiration_date: Expiration Date
cvv: CVV
one_time_payment_amount: Amount
one_time_payment_invoice_number: Invoice Number(s)
subscription_plan_id: Subscription Plan
subscription_start_date: Start Date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment