Rails provides tag links for associations in such fixtures:
### in pirates.yml reginald: name: Reginald the Pirate monkey: george ### in monkeys.yml george: name: George the Monkey pirate: reginald
This is great for models with unnamed places, but I use namespaces, so Rails gets confused and wants to insert labels instead of label references.
Any known workaround or fix?
Fixtures.identify seems like the only solution, not very pretty, but better than identifiers.
Fixtures.identify
### in pirates.yml reginald: name: Reginald the Pirate monkey_id: <%= Fixtures.identify(:george) %> ### in monkeys.yml george: name: George the Monkey pirate_id: <%= Fixtures.identify(:reginald) %>