Overriding find_by_* methods causes error

Hi! I fixed #15288 issue. I didn't found test model for this case, because I create it myself. Please, review my code.
you can do `Module new do ... end` with no need for class eval