Ruby on Rails: How to verify haml files syntax within rails project?
- by Acidburn2k
I've installed HAML into my project and it is working like a charm - the templates are beeing rendered without a problem. My question is how can I do the rendering on the command line, by using HAML program. That would be super for debugging purposes, meantime while I try to compile HAML file I get the error on first Rails related Ruby code to be found:
% cat app/views/dashboard/index.html.haml
- title "Home"
%p
Lorem ipsum dolor sit amet...
% haml app/views/dashboard/index.html.haml
Exception on line 1: undefined method `title' for #<Object:0xb73283b0>
Use --trace for backtrace.
Page is rendered fine returned correctly through the webserver.