# Erb in yaml

**URL:** <https://www.ruby-forum.com/t/erb-in-yaml/112969>\
**Category:** Rails\
**Created:** [August 25, 2007, 1:50am UTC](https://www.ruby-forum.com/t/erb-in-yaml/112969 "2007-08-25T01:50:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eggie5](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7c8e57/32.png) [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Post date:** [August 25, 2007, 1:50am UTC](https://www.ruby-forum.com/t/erb-in-yaml/112969/1 "2007-08-25T01:50:09Z")

</div>

Is there anything invalid about this? It’s one of my fixtures…

c\_waiting:  
id: 2  
birth: \<%= Time.now %\>

---

<div class="post-metadata">

**Author:** ![eggie5](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7c8e57/32.png) [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Post date:** [August 26, 2007, 8:16pm UTC](https://www.ruby-forum.com/t/erb-in-yaml/112969/2 "2007-08-26T20:16:26Z")

</div>

It looks fine. ERB is allowed in YAML files and will be evaluated when  
the  
fixtures are loaded. So Time.now would represent the fixture load time,  
not  
the time when called. Are you having some sort of problem with it?

Rob K.
