Monday, December 26, 2011

Customizing rails default generators

Objective

Customizing the template of default rails generators.

How it works


This is actually pretty simple :) You might get an idea when you take a look here. There you can find all the templates. Now if you want to customize lets say the index.html.erb, then in your project directory create the "lib/templates/erb/scaffold/index.html.erb". After that when you create a scaffold the generator will use your template.

Reference



No comments: