On 1/19/07, why the lucky stiff <[EMAIL PROTECTED]> wrote:
> On Fri, Jan 19, 2007 at 11:02:37AM -0700, James Earl wrote:
> > Replying to myself... this works, instead of using yield. Not very
> > pretty I know :)
> >
> > module Test
> > require 'erb'
> > def render(m)
> > content=ERB.new(I
On Fri, Jan 19, 2007 at 11:02:37AM -0700, James Earl wrote:
> Replying to myself... this works, instead of using yield. Not very
> pretty I know :)
>
> module Test
> require 'erb'
> def render(m)
> content=ERB.new(IO.read("templates/#{m}.html")).result(binding)
> layout=ERB.new(IO.rea
On Jan 19, 2007, at 7:02 PM, James Earl wrote:
> Replying to myself... this works, instead of using yield. Not very
> pretty I know :)
Cool, you figured it out yourself!
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mail
On 1/19/07, James Earl <[EMAIL PROTECTED]> wrote:
> Hi, I thought it would be fun to try to write a render method that
> uses erb for rending. I'm not much of a programmer, but I still like
> to try:
>
> module Test
> require 'erb'
> def render(m)
> ERB.new(IO.read("templates/layout.html")
Hi, I thought it would be fun to try to write a render method that
uses erb for rending. I'm not much of a programmer, but I still like
to try:
module Test
require 'erb'
def render(m)
ERB.new(IO.read("templates/layout.html")).result(binding) do
ERB.new(IO.read("templates/#{m}.html")
5 matches
Mail list logo