Dynamic fixtures for time didn’t seem to be working…

For it while, it seemed like eRb wasn’t working in Rail’s dynamic fixtures. It use to work, and since I wasn’t paying attention, at some point, something like this stopped working:

post:
id: 1
timestamp:


After only a bit of head scratching and thinking (it pays to think!), I figured out that it only takes xmlschema datetime formats. I don’t remember it being the case, but yeah, that’s what you have to do now…at least for Rails 1.2.0+. So now, it should look like this.

post:
id: 1
timestamp:


Hope that saved you some time. Tip!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s