Model generator should look for custom override in proper location

I went on quite an adventure today trying to override the template used by the model generator to create the migration file. Looks like at least one other person has had the same problem Rails overriding migration template - Stack Overflow

The problem is that when the feature was added that let you generate a ‘create table’ migration independent of a model, it broke the search path for the template when using the model generator (Support creating a table migration generator · rails/rails@20e0415 · GitHub).

I’ve submitted a PR with a proposed fix, though I could use feedback on the approach Fix search for create_table_migration template override by joshuaflanagan · Pull Request #13972 · rails/rails · GitHub