Forum: Ruby on Rails What happened to the (dynamic) fixtures?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Xdmx X. (Guest)
on 2008-11-30 21:19
Hi, i've a fixture with some ruby code, something like this:

  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 ?
Xdmx X. (Guest)
on 2008-11-30 21:46
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 would return nil
This topic is locked and can not be replied to.