[chef] Including sub templates


Chronological Thread 
  • From: Paul Choi < >
  • To: " " < >
  • Subject: [chef] Including sub templates
  • Date: Tue, 5 Apr 2011 17:01:53 +0000
  • Accept-language: en-US

Hello,

I apologize in advance because I think this has been asked before... But I can't seem to find it in the archives.

How do you include another .erb in a template?

In my .erb, can I try something like this? (erubis -z syntax check comes out ok)
<% ERuby.import("schema.yaml.erb") %>

Or is it better to do something like in Ruby On Rails:
<% render :partial => "schema" %>
Where it'd reference a file called "_schema.yaml.html.erb"?

Which would work, and also, which is better?

-Paul



Archive powered by MHonArc 2.6.16.

§