Crashes when using invalid source in a has_many through: relation
I misconfigured an ActiveRecord relation and didn't notice, as the app and specs were running fine (the app doesn't use the relation directly yet). But when running active_record_doctor I only received an error message which left me quite clueless - see below:
Crashes when using invalid
source
in ahas_many through:
relationI misconfigured an ActiveRecord relation and didn't notice, as the app and specs were running fine (the app doesn't use the relation directly yet). But when running active_record_doctor I only received an error message which left me quite clueless - see below:
My code, including the wrongly named
source
After correcting the relation
It worked again.
Next Steps
Would be great, if someone can find the motivation and time to rescue the error and instead put out a clear error message. 😅