Well, the elegant (and perhaps philosophically correct) way is to use Markaby.

In general, I try to avoid placing raw HTML into my Ruby code. If you don't 
want to rewrite your HTML, you can use ERB templates. Without being redundant, 
more info on how to make this work can be found here:

http://rubyforge.org/pipermail/camping-list/2010-August/001413.html

Disclaimer: I haven't tried it myself.

-- 
Trevor Johns
http://tjohns.net


-- 
Trevor Johns
http://tjohns.net


On Monday, August 13, 2012 at 8:44 PM, gurugeek wrote:

> hello,
> I am trying to have some simple HTML to be used as a placeholder page for new 
> servers users in a small camping application (basically with using the main 
> site layout plus the current date and time :) )and I was wondering if the 
> correct way is to rewrite the whole html using markaby or I should use the 
> hack 
> 
> def layout
>     text '
> 
> .... html inside
> where the only ruby code would be Today is  '+Time.now.asctime+' '
> 
> or if there is any way that I don't know to have inline templates/use erb ? 
> 
> thanks a lot !
> Best Regards
> David
> 
> _______________________________________________
> Camping-list mailing list
> Camping-list@rubyforge.org (mailto:Camping-list@rubyforge.org)
> http://rubyforge.org/mailman/listinfo/camping-list
> 
> 


_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to