store_model: a gem for handling JSON-backed attributes as ActiveRecord models
https://github.com/DmitryTsepelev/store_model
StoreModel allows to work with JSON-backed database columns in a similar way we work with ActiveRecord models. For instance, if you have a model Product with a jsonb column called configuration, you can access configuration
fields using product.configuration.color
instead of product.configuration["color"]
with a type-casting powered by Attributes API.
Post a comment