diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2013-11-07 23:32:47 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2013-11-07 23:32:47 +0530 |
commit | 216ec8d559797a49197e80be8146d53811df62b6 (patch) | |
tree | 512e67b35b12b0ecc4922b73223fde9c04c63275 /activerecord/lib | |
parent | 705b720b4b30e7c1a3d5cc0db17be0e722f0f1ad (diff) | |
parent | cb632188b33c2eaf7505c3df85e5ced354cbe2d2 (diff) | |
download | rails-216ec8d559797a49197e80be8146d53811df62b6.tar.gz rails-216ec8d559797a49197e80be8146d53811df62b6.tar.bz2 rails-216ec8d559797a49197e80be8146d53811df62b6.zip |
Merge branch 'master' of github.com:rails/docrails
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/serialization.rb | 3 | ||||
-rw-r--r-- | activerecord/lib/active_record/store.rb | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/serialization.rb b/activerecord/lib/active_record/attribute_methods/serialization.rb index 5701804168..d484659190 100644 --- a/activerecord/lib/active_record/attribute_methods/serialization.rb +++ b/activerecord/lib/active_record/attribute_methods/serialization.rb @@ -24,6 +24,9 @@ module ActiveRecord # serialized object must be of that class on retrieval or # <tt>SerializationTypeMismatch</tt> will be raised. # + # A notable side effect of serialized attributes is that the model will + # be updated on every save, even if it is not dirty. + # # ==== Parameters # # * +attr_name+ - The field name that should be serialized. diff --git a/activerecord/lib/active_record/store.rb b/activerecord/lib/active_record/store.rb index b841b977fc..301bc503c7 100644 --- a/activerecord/lib/active_record/store.rb +++ b/activerecord/lib/active_record/store.rb @@ -15,6 +15,10 @@ module ActiveRecord # You can set custom coder to encode/decode your serialized attributes to/from different formats. # JSON, YAML, Marshal are supported out of the box. Generally it can be any wrapper that provides +load+ and +dump+. # + # NOTE - If you are using special PostgreSQL columns like +hstore+ or +json+ there is no need for + # the serialization provieded by +store+. You can simply use +store_accessor+ instead to generate + # the accessor methods. + # # Examples: # # class User < ActiveRecord::Base |