Rails Override Default Scaffold Templates
To changing the Rails scaffold templates, we would find the location of the railties gem with bundle show railties
and get to the path lib/rails/generators/erb/scaffold/
templates to find the templates to modify, as done in an older blog post.
However, this changes the templates for all rails projects from that point forward. To override the scaffolding templates for a single project, create the directory lib/templates/erb/scaffold
and copy the railties templates into the directory to modify.