Is it possible to use different keys for the same value?
[activerecord, activemodel]: 'test'
I expect the same result as with this:
activerecord: 'test'
activemodel: 'test'
Is it possible to use different keys for the same value?
[activerecord, activemodel]: 'test'
I expect the same result as with this:
activerecord: 'test'
activemodel: 'test'
That doesn't work because YAML allows you to specify keys of any type, so
is a mapping with a single key, the sequence
[activerecord, activemodel]
whose value is'test'
.Instead, you can use an anchor/alias:
However, there's no way of attaching both keys to the single value in one key/value pair.