handle not only strings in date type cast #4035

Merged
merged 1 commit into from Dec 20, 2011

Projects

None yet

3 participants

@lest
Contributor
lest commented Dec 19, 2011

Original issue #3865

@martinotten

Why do you return the value regardless if it is a valid date or not? Shouldn't you return nil as you did on line 137?

Owner
lest replied Dec 20, 2011

Original code work that way. Datetime column assignment works such way.
So it seams to be unexpected behaviour.

@lest
Contributor
lest commented Dec 20, 2011

@tenderlove could you take a look?

@tenderlove tenderlove merged commit 3ef20aa into rails:master Dec 20, 2011
@lest lest referenced this pull request Dec 22, 2011
Closed

date typecast before saving #3865

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment