byroot / activerecord-typedstore

ActiveRecord::Store but with type definition
MIT License
439 stars 57 forks source link

Support Rails 5.1 #50

Closed rafaelfranca closed 7 years ago

rafaelfranca commented 7 years ago

We still have one deprecation that I'm not sure how to solve it.

The deprecation in question was added by @sgrif in https://github.com/rails/rails/commit/4fed08fa787. It seems that code path was deprecated using two premisses:

Both premisses are invalid with this gem. We do use define_attribute_method and attribute API doesn't work for the specific case of this gem yet.

I tried to override attribute_will_change! in this gem but that would require the attribute_changed? method to know which typed store it is being used.

I'm more inclined to revert that deprecation, since I could not find a way to make the attributes API work for this gem.

Closes #49

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.2%) to 94.512% when pulling 222bb5b206c186337da559b9c1b53278f9ff24fb on rails-51 into 086557afa82161b6daa100d2231e64ddbf244bad on master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.2%) to 94.512% when pulling 222bb5b206c186337da559b9c1b53278f9ff24fb on rails-51 into 086557afa82161b6daa100d2231e64ddbf244bad on master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.2%) to 94.512% when pulling 222bb5b206c186337da559b9c1b53278f9ff24fb on rails-51 into 086557afa82161b6daa100d2231e64ddbf244bad on master.

benjaminwood commented 7 years ago

Awesome, thanks for this! 🥇