http://www.politiker-stopp.de/gfx/politiker-stopp-print.png

Benjamin Schieder

[TECHSUCKS] CUSTOMIZE RAILS SCAFFOLD TEMPLATE

2012 October 15 | 0 comments

This cost me a whole day today to figure out:
How to customize the default scaffold template in ruby on rails 3:


cd RAILS_PROJECT
mkdir -p lib/templates/erb/scaffold
cd lib/templates/erb/scaffold
cp ${GEM_PATH}/gems/railties-3.*/lib/rails/generators/erb/scaffold/templates/*

Now you can edit the templates to fit your own CI and will not have to manually change them every time you need a new scaffold.


EOF

Category: blog

Tags: TechSucks ruby on rails


Post a comment

All comments are held for moderation; basic HTML formatting is accepted.

Name: (required)
E-mail: (required, not published)
Website: (optional)
Comment: