If I want to change the default controller template created by scaffold in Rails, it is dead easily - after Googling has discovered around me, I can simply put the controller.rb file in lib / templates / rails / controller so that the generator can pick up instead of the value default.
I cannot find any explanation where I can do the same for the model file. I do not want to create a separate generator, I just want:
> rails generate model foo
create a model file foo.rb based on the model.rb template that I am doing.
source share