tapioca icon indicating copy to clipboard operation
tapioca copied to clipboard

Should we support `ActiveRecord::Store`?

Open sambostock opened this issue 3 years ago • 2 comments

Our application uses ActiveRecord::Store, but Tapioca does not support it, so we had to write a shim. I began investigating adding it, but while looking for where to implement it I discovered we support ActiveRecord::TypedStore.

Before I go any further, I'd like to establish the project's stance:

  • Are we open to supporting ActiveRecord::Store, or
  • do we recommend consumers use ActiveRecord::TypedStore instead?

I should note that I only found out about TypedStore because I looked into adding support for Store. If we prefer one over the other, we could, for example, log a message if we detect the host app uses ActiveRecord::Store advising they switch.

sambostock avatar Oct 06 '22 23:10 sambostock

Using ActiveRecord::Store is fine, so we should support it.

rafaelfranca avatar Oct 11 '22 23:10 rafaelfranca

As far as I can tell, the TypedStore compiler doesn't support things like prefix and suffix, presumably because those aren't persisted anywhere on the object. ActiveRecord::Store has the same limitation -- is it ok to add an ActiveRecord::Store compiler that only support basic usage without prefix/suffix/etc?

dom-binti avatar Oct 27 '22 16:10 dom-binti