# What happened to the (dynamic) fixtures?

**URL:** <https://www.ruby-forum.com/t/what-happened-to-the-dynamic-fixtures/154498>\
**Category:** Rails\
**Created:** [November 30, 2008, 8:19pm UTC](https://www.ruby-forum.com/t/what-happened-to-the-dynamic-fixtures/154498 "2008-11-30T20:19:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xdmx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/53a042/32.png) [@xdmx](https://www.ruby-forum.com/u/xdmx)\
**Post date:** [November 30, 2008, 8:19pm UTC](https://www.ruby-forum.com/t/what-happened-to-the-dynamic-fixtures/154498/1 "2008-11-30T20:19:17Z")

</div>

Hi, i’ve a fixture with some ruby code, something like this:

first:  
attr1: text  
attr2: \<%= 3.days.ago %\>

But now the \<&= 3.days.ago %\> doesn’t return anymore the correct value,  
but nil.  
What happened? How can i put some dynamic text into the fixtures like N  
days ago ?  
Thanks

---

<div class="post-metadata">

**Author:** ![xdmx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/53a042/32.png) [@xdmx](https://www.ruby-forum.com/u/xdmx)\
**Post date:** [November 30, 2008, 8:46pm UTC](https://www.ruby-forum.com/t/what-happened-to-the-dynamic-fixtures/154498/2 "2008-11-30T20:46:33Z")

</div>

Found, it’s kind a bug… with a datetime attribute in the fixture the  
value must converted to the db format (to\_s(:db)), otherwise a simple  
Time.now would return nil
