On Wed, Jan 28, 2009 at 18:33, Bharat <[email protected]> wrote:

>
> Now I know that haml is a command line utility, but I would like to
> check the converted haml files in the context of my Rails
> application.  Is there a way that it can be done using the Rails
> console?


There is a way, but it has its limitations. Stick this at the end of your
"environment.rb" or in "config/initializers/haml.rb":
http://gist.github.com/54183

Now in rails console you can first set instance variables, like @comments,
and do:

>> haml "comments/index"

This will not work if your template includes partials, deals with controller
or request objects and similar. It will only work for most basic templates.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to