In Rails 2.0 view templates have an ending like .html.erb, .css.erb or .xml.erb (instead of f.i. .rhtml in Rails 1.2.x). So if you've selected a syntax highlighting in TextMate for - say a .html.erb template, this would apply to all templates with ending .erb (i.e. .css.erb etc.) and that's bad, because you want the .css.erb file to have another syntax highlighting (CSS!).
To fix this, you simply have to do the following:
- In the TextMate menu select Bundles -> Bundle Editor -> Edit Languages
- Expand the "Ruby On Rails" item
- Select "HTML (Rails)"
- Replace "fileTypes = ( 'rhtml' );" with "fileTypes = ( 'rhtml', 'html.erb' );"
- Redo this for every language you use (i.e. CSS -> css.erb, XML -> xml.erb...) in its corresponding menu
- Now you can select a separate highlighting for every .erb extension
(via Google Groups)