I’ve been using the fixture enhancements in edge rails to manage
associations between objects. It has been working great except for
polymorphic associations. I saw that they weren’t supported in
Rathole.
I read some post that the id’s generated by the fixtures are constant
so I just pulled the generated id’s and manually set the polymorphic
id and the polymorphic type in the fixture as well.
This worked great locally on my machine, but when I moved the
application to a staging are the generated id’s were different,
breaking all of the associations.
Anyone have any better luck with another approach?
I read some post that the id’s generated by the fixtures are constant
so I just pulled the generated id’s and manually set the polymorphic
id and the polymorphic type in the fixture as well.
Hi Dan,
You can insert the generated ID for any fixture using ERB: