- From: "Julian C. Dunn" <
>
- To:
- Subject: [chef] Re: [Template] - variables vs direct attribute access
- Date: Fri, 31 Oct 2014 10:57:39 -0400
On Oct 31, 2014, at 9:47 AM, Tyler
<
>
wrote:
>
>
I don’t have any hard evidence about this, but I suspect that you may get
>
better error messages outside the template.
I think that used to be true in old versions of Chef, but not anymore —
template errors now show locality.
As others pointed out, if you’re just printing node attributes in the
template then it’s kind of a wash either way. But I try to avoid doing really
complicated logic in templates, for the sole reason of readability.
Interspersing control structures with <%- and %> ERB escaping makes my head
hurt.
Also, yeah, there are software design arguments (separation of
model/controller from view) too.
- Julian
Archive powered by MHonArc 2.6.16.