Mikel Lindsaar
Mon, 10 Mar 2008 04:41:32 -0700
> Actually I think I know why it does not work - perhaps the Lab does > not process/render Ruby ?
Probably not, it is usually not a good idea to allow anyone to run
arbitrary ruby code on your server, though there are ways to make it
somewhat safe... you never know :)
Anyway, to get around it, you can fire up irb on your own computer and do this:
irb> require 'rubygems' #=> true
irb> require 'haml' #=> true
irb> require 'date'
irb> haml_text =<<ENDDOC
irb> %p
irb> Date/Time:
irb> - now = DateTime.now
irb> %strong= now
irb> - if now > DateTime.parse("December 31, 2006")
irb> = "Happy new " + "year!"
irb> ENDDOC
irb> haml = Haml::Engine.new(haml_text)
irb> puts haml.render
And you should get:
<p>
Date/Time:
<strong>2008-03-10T22:40:43+11:00</strong>
Happy new year!
</p>
=> nil
Regards
Mikel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to haml@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---