liveh2o / active_remote

Active Remote provides Active Record-like object-relational mapping over RPC. It's Active Record for your platform.
MIT License
63 stars 23 forks source link

Updates for Rails 6.1 #86

Closed WriterZephos closed 1 year ago

WriterZephos commented 2 years ago

I had to tweak some code and I don't fully understand the changes in Rails that made it necessary, but what I do know is that the private write_attribute method for ActiveModel was removed. I replace it with the implementation it used to have, but I am wondering if there is a better way to do this that uses the public API instead of private stuff that is prone to change again on us.

The other issue I had was with the cache_key method in integrations.rb. For some reason updated_at has a string key instead of a symbol key, but I opted to simply call the attribute normally instead and that got the tests to pass that way.

Happy to make changes if there is a better way forward.

WriterZephos commented 2 years ago

I am not sure if there are any changes needed for the specs to test this against Rails 6.1. I looked but didn't see any config for that.

WriterZephos commented 1 year ago

This was merged into another PR. Closing.