Closed eikes closed 2 years ago
Wow! It's gonna help me a lot. Thank you.
@eikes Thanks for submitting this! I ended up merging #64 which is similar to your changes.
It's nice to be able to use ruby 3.1. But This PR didn't fix the rails 7.1 issue. So I opened another one for that:
https://github.com/DatabaseCleaner/database_cleaner-active_record/pull/78
Ruby 3.1 and above ships with Psych 4.0. Psych throws a
Psych::BadAlias: Unknown alias: default
error when it loads adatabase.yml
which uses YAML inheritance such as the following:We implement the the same pattern as
ActiveSupport::ConfigurationFile
to circumvent this problem: useYAML.unsafe_load
when it is available.