aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/coders
Commit message (Collapse)AuthorAgeFilesLines
* Clean up the implementation of AR::DirtySean Griffin2015-09-241-8/+9
| | | | | | | | | | | | | This moves a bit more of the logic required for dirty checking into the attribute objects. I had hoped to remove the `with_value_from_database` stuff, but unfortunately just calling `dup` on the attribute objects isn't enough, since the values might contain deeply nested data structures. I think this can be cleaned up further. This makes most dirty checking become lazy, and reduces the number of object allocations and amount of CPU time when assigning a value. This opens the door (but doesn't quite finish) to improving the performance of writes to a place comparable to 4.1
* Provide a better error message for unsupported classes in `serialize`Sean Griffin2014-12-271-0/+11
| | | | | | | | | We only support classes which provide a no-args constructor to use as a default value. We can provide a more helpful error message if we catch this when `serialize` is called, rather than letting it error when you try to assign the attribute. Fixes #18224
* Merge pull request #16162 from chancancode/fix_json_coderGodfrey Chan2014-07-151-1/+1
| | | | Fixed JSON coder when loading NULL from DB
* Revert "Revert "Merge pull request #16059 from jenncoop/json-serialized-attr""Godfrey Chan2014-07-151-0/+13
| | | | | | | This reverts commit 6f3c64eeb1dc8288dae49f114aaf619adc7dcb7f. Conflicts: activerecord/CHANGELOG.md
* Revert "Merge pull request #16059 from jenncoop/json-serialized-attr"Godfrey Chan2014-07-051-13/+0
| | | | | | This reverts commit a03097759bd7103bb9db253e7ba095f011453f75. This needs more work before it would work correctly on master.
* Merge pull request #16059 from jenncoop/json-serialized-attrGodfrey Chan2014-07-051-0/+13
| | | | | | | | Fixed issue with ActiveRecord serialize object as JSON Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/attribute_methods/serialization.rb
* Remove all error masking when decoding serialized data fails?Mike Mangino2013-04-021-13/+8
|
* Raise an exception when unserialization fails due to a missing classMike Mangino2013-03-281-1/+2
|
* drop errors constantVipul A M2013-03-271-2/+1
|
* fix AR::Coders::YAMLColumn nodoc [ci skip]Francesco Rodriguez2012-09-211-4/+2
|
* Psych is always available on 1.9Jeremy Kemper2012-05-311-5/+3
|
* ActiveRecord::Coders::YAMLColumn#dump should raise an errorGuten2012-03-261-1/+7
| | | | | | | | closes #2737 Conflicts: activerecord/lib/active_record/coders/yaml_column.rb
* Do not serialize nil in serialized attribute.Kirill Lashuk2012-01-311-1/+1
|
* Make serialized columns with explicit object_type return a new instance of ↵Guillermo Álvarez2011-02-031-0/+2
| | | | the object instead of nil
* move the coders to the serialized_attributes hashAaron Patterson2011-02-011-1/+6
|
* adding a YAML Column coder for YAML serialization to db columnsAaron Patterson2011-02-011-0/+34