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

Rails 5 support #85

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open

Rails 5 support #85

wants to merge 37 commits into from

Conversation

inbeom
Copy link
Collaborator

@inbeom inbeom commented Oct 8, 2016

Issues resolved

Timing mismatch between AR connection adapter loading and monkey-patching

In Rails 5, monkey-patches loaded by ActiveUUID::Patches.apply! were not properly injected to connection adapters as original connection adapters are not loaded by the time apply! method is invoked.

The connection adapters are loaded when connection spec is analyzed and resolved by ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver#spec, which is invoked inside ActiveRecord::Base#establish_connection.

I've added a workaround by performing the patches immediately after connections are established, using Module#prepend.

Invalid serialization of UUID-type columns

Due to refactoring of column type metadata classes (the type class definitions are moved into ActiveModel), a new interface for value serialization is introduced.

I overrided the new ActiveRecord::Type::UUID#serialize method to serialize UUID values as desired.

Deprecated alias_method_chain

I replaced alias_method_chain with Module#prepend where it can be done easily.

@inbeom inbeom changed the title Rails 5 + MySQL, SQLite support Rails 5 support Oct 11, 2016
@rafaelsales
Copy link

Can we merge this ASAP?

@inbeom
Copy link
Collaborator Author

inbeom commented Jan 15, 2017

@rafaelsales I started maintaining my fork of activeuuid https://github.com/inbeom/activeuuid

If you're interested, use my fork instead. Thanks!

@inbeom inbeom mentioned this pull request Jun 14, 2017
@anderscarling
Copy link

@inbeom Will you be releasing your fork to ruby gems?

@jashmenn
Copy link
Owner

@inbeom - I can give you access to the rubygem if you'd like

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.

4 participants