Ruby on Rails: How to verify haml files syntax within rails project?

Posted by Acidburn2k on Stack Overflow See other posts from Stack Overflow or by Acidburn2k
Published on 2010-03-25T14:51:31Z Indexed on 2010/03/25 14:53 UTC
Read the original article Hit count: 431

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about haml