New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix `Type::Date#serialize` to return a date object correctly #25364

Merged
merged 1 commit into from Jun 29, 2016

Conversation

Projects
None yet
6 participants
@kamipo
Member

kamipo commented Jun 11, 2016

Currently Type::Date#serialize does not cast a value to a date object.
It should be cast to a date object for finding by date column correctly
working.

Fixes #25354.

@rails-bot

This comment has been minimized.

rails-bot commented Jun 11, 2016

r? @rafaelfranca

(@rails-bot has picked a reviewer for you, use r? to override)

@kamipo kamipo force-pushed the kamipo:fix_serialize_for_date_type branch 2 times, most recently Jun 12, 2016

@sgrif

This comment has been minimized.

Member

sgrif commented Jun 13, 2016

Can you update the commit message to include what about the method is being fixed, and the bug this is addressing, and why this addresses it?

@kamipo kamipo force-pushed the kamipo:fix_serialize_for_date_type branch Jun 14, 2016

@kamipo kamipo changed the title from Fix `serialize` for `date` type to Fix `Type::Date#serialize` to return a date object correctly Jun 14, 2016

@kamipo kamipo force-pushed the kamipo:fix_serialize_for_date_type branch Jun 14, 2016

@kamipo

This comment has been minimized.

Member

kamipo commented Jun 14, 2016

Updated the commit message!

Fix `Type::Date#serialize` to return a date object correctly
Currently `Type::Date#serialize` does not cast a value to a date object.
It should be cast to a date object for finding by date column correctly
working.

Fixes #25354.

@kamipo kamipo force-pushed the kamipo:fix_serialize_for_date_type branch to 10b81fb Jun 15, 2016

@tmertens

This comment has been minimized.

tmertens commented Jun 28, 2016

Will this fix be backported to rails 4?

@rafaelfranca

This comment has been minimized.

Member

rafaelfranca commented Jun 29, 2016

@tmertens hardly. The implementation in 4.2 is a little bit different. But if you or @kamipo want to do the backport I'll be happy to apply.

@rafaelfranca rafaelfranca merged commit a215642 into rails:master Jun 29, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

rafaelfranca added a commit that referenced this pull request Jun 29, 2016

Merge pull request #25364 from kamipo/fix_serialize_for_date_type
Fix `Type::Date#serialize` to return a date object correctly
@rafaelfranca

This comment has been minimized.

Member

rafaelfranca commented Jun 29, 2016

Backported in 64b1913 to 5-0-stable.

@kamipo kamipo deleted the kamipo:fix_serialize_for_date_type branch Jun 29, 2016

rafaelfranca added a commit that referenced this pull request Jun 29, 2016

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