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

ActiveModel DateTime Attribute is a Time, not a DateTime #1036

Merged

Conversation

louissobel
Copy link
Contributor

Motivation

From what I can tell, both:

  • empirically from a project I'm working on
  • the rails code and spec

ActiveModel attributes that are a ActiveModel::Type::DateTime or a ActiveModel::Type::Time end up as a ruby ::Time, not a ruby ::DateTime.

Implementation

Small change to use ::Time rather than ::DateTime

Tests

I updated the existing test for the ActiveModel compiler

@ghost ghost added the cla-needed label Jul 5, 2022
@ghost ghost removed the cla-needed label Jul 5, 2022
@Morriar Morriar merged commit 4f69cb2 into Shopify:main Jul 6, 2022
@louissobel louissobel deleted the active-model-DateTime-returns-a-Time branch July 6, 2022 16:38
@louissobel
Copy link
Contributor Author

great, thank you!

@shopify-shipit shopify-shipit bot temporarily deployed to production July 7, 2022 17:53 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to 0-9-stable August 19, 2022 20:37 Inactive
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