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

Fix typed store on most recent ActiveRecord #81

Merged
merged 3 commits into from Jul 28, 2020

Conversation

Edouard-chin
Copy link
Contributor

@Edouard-chin Edouard-chin commented Jul 28, 2020

There is two commits that fix two distinct issues.

cc/ @casperisfine

- We were previously overriding `query_attribute` but that doesn't
  work anymore because of the alias added in rails/rails@7834363#diff-ce3d2308407d3b07185a0e86261c54e7R34
- Main motivation for this change was that this method got removed
  in rails/rails@d784043
  . The change was later on reverted in rails/rails@75c309c (though the method signature isn't the same)

  Anyway, that made me realise that we shouldn't use
  `decorate_attribute_type` anymore but just `attribute` which is
  public API. Worth to note that we can only use `attribute` for
  application using Active Record 6.1 because a feature was added
  to `attribute` which makes it accept blockes (that we need for the
  subtype of a column after the schema is loaded) rails/rails@2d98240#diff-1fdaa87a21737c884c4415e2c392e418R208
@coveralls
Copy link

coveralls commented Jul 28, 2020

Coverage Status

Coverage increased (+0.3%) to 98.912% when pulling 2ff9d13 on Edouard-chin:ec-override-attribute into 6681b66 on byroot:master.

@casperisfine
Copy link
Collaborator

Seems like the rails-master Gemfile need to specify a newer pg:

Error loading the 'postgresql' Active Record adapter. Missing a gem it depends on? can't activate pg (~> 1.1), already activated pg-0.21.0. 

@byroot byroot merged commit fb77e0f into byroot:master Jul 28, 2020
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

4 participants