gregnavis / active_record_doctor

Identify database issues before they hit production.
MIT License
1.72k stars 56 forks source link

Fix `missing_presence_validation` for custom attributes with defaults #155

Closed fatkodima closed 9 months ago

fatkodima commented 10 months ago

Fixes #154.

This PR fixes missing_presence_validation not only for enums (which is internally defined as an attribute), but for any attribute having a default.

fatkodima commented 10 months ago

Too much version crap in this PR. I would still recommend dropping support for older railses.

active_record_doctor is a code quality tool. People who are on old railses do not have tests, meaning they do not care about any quality and for sure won't use this tool and are not a target audience. At least rails < 6.1 can be dropped, in my mind.

gregnavis commented 9 months ago

I'm closing this for now as I don't believe that the original report was natural bug.