views:

55

answers:

2

As far as I know, .rhtml is deprecated in Rails 2. In some guides there is only .erb, but both RubyMine and NetBeans IDE generate .html.erb and I've also seen it many people using.

I've tested both and they seem to work fine without any errors or warnings, but which one is correct? .erb or .html.erb

A: 

Typically you want to have the format in the file name.

Robert Rouse
+3  A: 

file_name.format.extension is the accepted convention now, where format is html, xml, json, anything really and extension is erb if you're using erb, haml if you're using haml and so on.

railsninja