Override the default Rails model template

I want to override the default model file generated with rails generate model. I created a template based on this file , but I cannot figure out where to put it. The other answers seem to offer /lib/templates/rails/model/model.rbor /lib/templates/rails/model/model_generator.rb, but none of them do anything - I put the template in this place, but when I run rails generate model ModelNameit is ignored.

Am I going to do it right? Where should I put the template?

+4
source share
2 answers

Solved: I wanted to lib/templates/active_record/model/model.rb.

+12
source
+2

All Articles