What is the difference between .erb, .rhtml and .html.erb?

What is the difference between .erb, .rhtml and .html.erb?

+44
ruby-on-rails erb rhtml
May 29 '10 at 19:31
source share
1 answer

Nothing really. It's just a change of philosophy between Rails 1 and Rails 2. Before Rails 2, you had .rhtml, file.rxml, and file.rjs files. In Rails, this has changed to file.content_type.template_engine. So with file.html.erb, the content type is html and the template engine is ERb. rxml is now xml.builder, and now rjs should (basically) be js.rjs

The new rails 3.0.rhtml files will not be supported .. html.erb is the new standard.

+75
May 29 '10 at 19:37
source share



All Articles