Skip to content
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

Delegate type_cast to injected type object in mysql #15198

Merged
merged 1 commit into from
May 20, 2014

Conversation

sgrif
Copy link
Contributor

@sgrif sgrif commented May 20, 2014

/cc @senny

ConnectionAdapters::Column.string_to_time value
class DateTime < ConnectionAdapters::Type::DateTime
def cast_value(value)
return super unless Mysql::Time === value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if Mysql::Time === value
  # actual code
else
  super
end

senny added a commit that referenced this pull request May 20, 2014
Delegate type_cast to injected type object in mysql
@senny senny merged commit 89ca680 into rails:master May 20, 2014
@sgrif sgrif deleted the sg-delegate-type-cast-mysql branch May 20, 2014 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants