diff options
author | Zachary Scott <e@zzak.io> | 2014-12-08 08:35:10 -0800 |
---|---|---|
committer | Zachary Scott <e@zzak.io> | 2014-12-08 08:35:10 -0800 |
commit | 93d5d778349f72ac81c8e15ab1b049a742cfd50d (patch) | |
tree | 6782517b9ff2a021a09ba5668eab52e0cc8cc117 | |
parent | 78504600f51abe496ce317f6b67ec2baf58f6574 (diff) | |
parent | 34a8a149c60e28b6808a67ab6b401fe8d0688656 (diff) | |
download | rails-93d5d778349f72ac81c8e15ab1b049a742cfd50d.tar.gz rails-93d5d778349f72ac81c8e15ab1b049a742cfd50d.tar.bz2 rails-93d5d778349f72ac81c8e15ab1b049a742cfd50d.zip |
Merge pull request #17966 from mikechau/update-ar-store-validation-documentation
Add note to Store about uniqueness validation (#17954) [skip ci]
-rw-r--r-- | activerecord/lib/active_record/store.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/store.rb b/activerecord/lib/active_record/store.rb index 3c291f28e3..aa9d199227 100644 --- a/activerecord/lib/active_record/store.rb +++ b/activerecord/lib/active_record/store.rb @@ -15,11 +15,14 @@ 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 PostgreSQL specific columns like +hstore+ or +json+ there is no need for + # NOTE: If you are using PostgreSQL specific columns like +hstore+ or +json+ there is no need for # the serialization provided by +store+. Simply use +store_accessor+ instead to generate # the accessor methods. Be aware that these columns use a string keyed hash and do not allow access # using a symbol. # + # NOTE: The default Validations with the exception of +uniqueness+ will work. For example, if you + # want to check for +uniqueness+ with +hstore+ you will need to use a custom validation to handle it. + # # Examples: # # class User < ActiveRecord::Base |