Wednesday, September 12, 2007

fixtures and datetime




For some reason, I found it really hard to find the correct format for datetime fields in a Ruby on Rails YAML fixture. Here it is:

For a "completed_at" column that is of format datetime:

t.column :completed_at, :datetime


Use the following in your fixtures:


completed_at: '2006-06-09T10:50:13-0700'