如何格式化日期以将其放入 factory_girl_rails 工厂,例如:
Factory.define(:profile) do |t|
t.length 110
t.shipdate 1993-04-06
end
如果重要的话,我正在使用 postgresql 和 factory_girl_rails 1.0。我得到的错误是ActiveRecord::StatementInvalid: PGError: ERROR: invalid input syntax for type date: "1982"
Rails 版本是 3.1