Override Default Rails Templates
Populate your project with default Rails templates so it's easy for you to override and customize.
Used 18 times
D
Dale Zak
Usage
Run this command in your Rails app directory in the terminal:
rails app:template LOCATION="https://railsbytes.com/script/V33s7e"
Template Source
Review the code before running this template on your machine.
run 'mkdir -p lib/templates/erb/scaffold && cp $(bundle show railties)/lib/rails/generators/erb/scaffold/templates/* lib/templates/erb/scaffold'
run 'mkdir -p lib/templates/rails/scaffold_controller && cp $(bundle show jbuilder)/lib/generators/rails/templates/* lib/templates/rails/scaffold_controller'
run 'mkdir -p lib/rails/generators/erb/scaffold && cp $(bundle show railties)/lib/rails/generators/erb/scaffold/scaffold_generator.rb lib/rails/generators/erb/scaffold/'