attr_json icon indicating copy to clipboard operation
attr_json copied to clipboard

Serialized json-hash-backed ActiveRecord attributes, super smooth

Results 22 attr_json issues
Sort by recently updated
recently updated
newest added

Hi, I wanted to use the [`strip_attributes` gem](https://github.com/rmm5t/strip_attributes) to strip white spaces from a string attr_json attribute, which surprisingly does not work. Current behaviour: Given a model using the `strip_attributes`...

This PR sets an attribute's default to array if the type is Array and has no other default defined. This solves the following error when working with `nested_attributes` when using...

Hi, I recently ran into an issue with AttrJson::Record::Dirty with an active record hook. The hook should extract and log changes of an attr_json field `mac` and was configured to...

I've looked before at hooking into standard ActiveRecord API to make it happen *automatially*, but determined that was infeasible, ActiveRecord didn't seem to offer appropriate hooks to override/customize how `UPDATE`...

This confusing to talk/think about. But some things have been a bit inconvenient with form handling, that we can possibly take care of with our `_attributes=` methods, which are of...

We're going to merge work for a potential 2.x release into this branch. It's somewhat experimental, so we're keeping it out of master. I'm going to do PR's into this...

attr_json :models, some_model_class_type, array: true And then instance.models = [nil] instance.save! Does weird and unexpected things -- in some cases raising unexpectedly with a convoluted stack trace. Not sure what...

Hey again, sorry for bothering you one last time I read the docs about validations and got one last question. The validation is working, but I also want to show...

Future version should perhaps insist on rails_attribute true, and get rid of our local dirty tracking entirely?

Rails 5.2 has a real attributes API for ActiveModel. We're doing okay without it, and supporting Rails 5.0-5.2, but let's rename some of our methods and ivars in JsonAttribute::Model to...

maybe?