What that means is that you can have any template go through the Haml template system rather than ERB by just changing the extension. However, the Haml syntax is very, very different from the ERB syntax, so your existing ERB templates will have to be converted to Haml in order for them to work.
On Tue, Jan 27, 2009 at 12:38 PM, Stephen Bannasch < [email protected]> wrote: > > On this page: > > http://haml.hamptoncatlin.com/tutorial/ > > It states: > > Haml is a drop-in replacement for Rhtml. So, that means any file in > your app/view/* > folder can be switched over to the Haml interpreter by simply > changing the extension > of the file. > > /app/view/account/login.rhtml Æ /app/view/account/login.haml > > Now, when you view that page, instead of Erb getting its hands on > the template, > it's handled by Haml instead. Since it's integrated with > ActionView, that means > you can mix up Erb and Haml and everything else on-the-fly > throughout your site. > > However in a generic new app when I change: > > application.html.erb => application.html.haml > > I get this error > > Illegal nesting: nesting within plain text is illegal. > > I didn't change the content of application.html.erb -- just the > suffix of the filename ... > > Did I misinterpret that section in the tutorial? > > I'm using haml v2.0.7 and rails 2.2 > > The app is based on bort: > > > > http://github.com/fudgestudios/bort/commit/298ef7375287c752a49d9f5728088f7e67958c6f > > with tabs replaced by 2-space chars. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/haml?hl=en -~----------~----~----~----~------~----~------~--~---
