Mon 3 Dec 2007
ArgumentError (3 elements of civil date are necessary)
Posted by kosmas under ruby on rails
Problem
On creating a default date on a model using the after create, and by using Model.date_field = ‘2007-01-01′ we get the error ArgumentError (3 elements of civil date are necessary)
Solution
The workaround is to use:
Model.date_field = Date.civil(2007,01,01)
No Responses to “ ArgumentError (3 elements of civil date are necessary) ”
Comments:
Leave a Reply
You must be logged in to post a comment.