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.read("templates/layout.html")).result(binding)
>   end
> end

Hey, nice tip.  You want to add this to the wiki?  A good place
would be CampingExtras[1].

_why

[1] http://code.whytheluckystiff.net/camping/wiki/CampingExtras
_______________________________________________
Camping-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to