byroot / activerecord-typedstore

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

Add support for exposition of accessors on type_store definition #42

Closed maximebedard closed 8 years ago

maximebedard commented 8 years ago

According to the documentation, it's supposed to be possible to define accessors: false or accessors: [:some_attr]. This wasn't currently possible since it was always using all the accessors anyways (except when they were explicitly defined on every fields).

I've also discovered that there was a whole bunch of issues when there's multiple typed_store defined on the same model. Hence the added memoization added here: https://github.com/byroot/activerecord-typedstore/pull/42/files#diff-4f88bac52914df95383817609b009208R21

Thoughts?

@byroot @rafaelfranca

maximebedard commented 8 years ago

Failures are related, I'll look into that tomorrow :)

rafaelfranca commented 8 years ago

Tests with Rails 5 are failing but I can't see in the travis output. We may want to enable the -b in .rspec.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.05%) to 94.704% when pulling 651ba24907e6c539e649ee268679125641b1a227 on maximebedard:add-accessors-false into c86e810c4451a119eddb888ea340fa58b706c59f on byroot:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.05%) to 94.704% when pulling ffc1ddd50210634e351cef2bd53f739f1d58cb13 on maximebedard:add-accessors-false into c86e810c4451a119eddb888ea340fa58b706c59f on byroot:master.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.2%) to 94.492% when pulling b1118771c8779093200fc6f0f34e8499084ce12d on maximebedard:add-accessors-false into c86e810c4451a119eddb888ea340fa58b706c59f on byroot:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.05%) to 94.704% when pulling 5823b673466be6f4af89b97cae9420d93b569208 on maximebedard:add-accessors-false into c86e810c4451a119eddb888ea340fa58b706c59f on byroot:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.05%) to 94.704% when pulling ce0ddad5c9761f14a881c83506df6702c0cdeefd on maximebedard:add-accessors-false into c86e810c4451a119eddb888ea340fa58b706c59f on byroot:master.

rafaelfranca commented 8 years ago

LGTM.

byroot commented 8 years ago

LGTM. Thanks for the outstanding coverage.

byroot commented 8 years ago

Published as 1.0.0 (the beta1 didn't have any reported bug for a very long time I think with this bug fix we're good.)