0

In my locales/en.yml, I have the following:

en:
  activerecord:
    attributes:
      ticket:
        customer_name: "Customer Name"
      inventory:
        quantity: 'Quantity'
      resources:
        quantity: 'Quantity'
      hours:
        quantity: 'Quantity'

Is there a way for me to define the string 'Quantity' as a string constant so I can re-use the constant in my en.yml?

EastsideDev
  • 6,257
  • 9
  • 59
  • 116

1 Answers1

3

Example:

default: &default
  adapter: mysql2
  encoding: utf8
  username: username
  password: YOURDBPASSWORD

development:
  <<: *default

test:
  <<: *default

Also see answer: Reuse a block of code in YAML

buren
  • 742
  • 1
  • 8
  • 14