April 3rd, 2007

.erb lives a short life

Earlier this year the default Rails template extension switched from .rhtml to .erb and from .rxml to .builder. Yesterday Rick committed another change which modifies the defaults once again.

If you are keeping up with edge you should now be using .html.erb as opposed to .erb, and .xml.builder as opposed to .builder.

I assume this change was made to make a cleaner separation between the templating language being used and the content-type. This allows you to use something like .css.builder for css files rendered using builder, or .xml.erb for xml files using erb.

As always, Edge Rails is subject to change, use at your own risk!


Comments

Ben Atkin says:

April 03, 2007 @ 08:18 AM

The file names are a bit long, but at least it will make things easier for syntax highlighters and searching source code.

Leave a Comment


Markdown syntax allowed