rails/activerecord/test/fixtures/parrots.yml
Andres Howard 7b741457e5 Use reflection_class in TableRow for fixtures
With models that use STI, Fixtures now load based
on the refelction class. This allows to resolve the enums
for each specific class instead of just resolving
those of the base class.
2021-11-25 17:44:14 -03:00

38 lines
610 B
YAML

_fixture:
ignore: DEAD_PARROT
DEAD_PARROT: &DEAD_PARROT
parrot_sti_class: DeadParrot
george:
name: "Curious George"
treasures: diamond, sapphire
parrot_sti_class: LiveParrot
breed: australian
louis:
name: "King Louis"
treasures: [diamond, sapphire]
parrot_sti_class: LiveParrot
breed: african
frederick:
name: $LABEL
parrot_sti_class: LiveParrot
breed: african
polly:
id: 4
name: $LABEL
killer: blackbeard
treasures: sapphire, ruby
<<: *DEAD_PARROT
DEFAULTS: &DEFAULTS
treasures: sapphire, ruby
parrot_sti_class: LiveParrot
breed: australian
davey:
*DEFAULTS