Dmitry Tsepelev

Results 97 comments of Dmitry Tsepelev

Hi, @23tux! Right now `StoreModel` focuses on isolating JSON(B) data from the parent model. In your example an array (where it is stored?) is used inside the `ApplicationRecord` subclass. Probably...

Aha, in this case having the built-in inclusion validator for arrays makes sense to me!

@23tux This is what should be done to make it work: 1. Take a look at [docs](https://guides.rubyonrails.org/active_record_validations.html#performing-custom-validations) about custom validators 2. Add a new custom validator (we already have [one](https://github.com/DmitryTsepelev/store_model/blob/master/lib/active_model/validations/store_model_validator.rb))...

@23tux Sorry for the long response, that's a valid point! We don't need to use a validator in the current implementation (however, there is a chance that someone would need...

Hi @harsh63! I guess it's not gonna work out of the box, cause AS has it's own mechanism to add attachments to records based on table name and id. In...

I have a feeling that it's possible, but no solution on the top of my head 🙂 Do you want to experiment with that?

Hi @23tux! I guess we can try to bring `encrypts` to the gem by including the right module 🙂 Before Rails 7 there was a [lockbox](https://github.com/ankane/lockbox#types) which works with store_model...

Hi @kaelumania! Could you please provide the example of what format you're trying to get and what you see instead? Gist or failing spec would be really helpful

Yeah, I re–checked it quickly, and looks like a regular `#save` calls only `cast`/`cast_value`