I know this has been mentioned before, but could we do something about validate and validates?
Having two methods with such similar names that do similar things but in a totally different way is extremely confusing. What’s more, if you do use validate instead of validates by mistake, no exceptions are raised and MyModel.valid? will return true.
I have trouble remembering which one I should be calling, and I’ve been working with Rails for years now. I can’t imagine how confused a novice programmer would be…
Perhaps renaming validate to something like validates_with would be the way to go (with proper deprecation warnings, of course)?
Is there are a reason we couldn’t put options.assert_valid_keys :on, :allow_nil, :allow_blank, :if, :unless as the second line of the validate method?
Then if you intend to call validates but mistakenly call validate you would receive an ArgumentError. If you use them wrong the other way around, it will already give ArgumentError.