aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods/serialization.rb
Commit message (Collapse)AuthorAgeFilesLines
* Serialized attribute can be serialized in an integer columnRafael Mendonça França2012-12-211-0/+8
| | | | | | | | | | Fix #8575 Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/attribute_methods/serialization.rb activerecord/test/cases/serialized_attribute_test.rb activerecord/test/models/person.rb
* Backport #8078: Fix `attributes_before_type_cast` for serialised attributes.Nikita Afanasenko2012-11-091-0/+10
| | | | Public method attributes_before_type_cast used to return internal AR structure (ActiveRecord::AttributeMethods::Serialization::Attribute), patch fixes this. Now behaves like read_attribute_before_type_cast and returns unserialised values.
* Merge pull request #5810 from kennyj/fix_5797Aaron Patterson2012-05-301-3/+4
| | | | | | Fix #5797. Error calling dup method on AR model with serialized field Conflicts: activerecord/lib/active_record/core.rb
* Fix attribute_before_type_cast for serialized attributes. Fixes #4837.Jon Leighton2012-02-071-0/+8
| | | | | | Conflicts: activerecord/lib/active_record/core.rb
* Make read_attribute code path accessible at the class levelJon Leighton2011-12-221-8/+12
|
* Remove the need for type_cast_attribute.Jon Leighton2011-12-011-8/+0
| | | | This is good because it reduces duplication.
* Don't rely on underscore-prefixed attribute methods.Jon Leighton2011-12-011-7/+4
| | | | | | Define singleton methods on the attributes module instead. This reduces method pollution on the actual model classes. It also seems to make something faster, I am unsure why! O_o
* consistencyJon Leighton2011-11-301-4/+4
|
* Don't check column type, you might implement a custom coder that serializes ↵Jon Leighton2011-11-301-1/+1
| | | | to a different type
* omg computer science!Jon Leighton2011-11-301-18/+34
| | | | | | | Implement a mini state machine for serialized attributes. This means we do not have to deserialize the values upon initialization, which means that if we never actually access the attribute, we never have to deserialize it.
* Don't need second paramJon Leighton2011-11-301-1/+1
|
* Move some serialization stuff out of BaseJon Leighton2011-11-301-0/+42
|
* Extract attribute serialization code into a separate moduleJon Leighton2011-11-301-0/+42