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.
I try remove `to_s` in previously commit, but I have a error https://travis-ci.org/rails/rails/jobs/35267661

Most likely this bug isn't of this, but it was fixed after adding to_s