aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/store.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-05-13 19:04:33 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-05-13 19:04:33 -0300
commit9b40f5cc36c38fca7e78008eb1df97a93a849f89 (patch)
tree0e07f97ec3518bd8e1c5aec45fbd2ae1290306d6 /activerecord/lib/active_record/store.rb
parentf443e119cd448b78bcb1584d7a9bd8b5775b5577 (diff)
downloadrails-9b40f5cc36c38fca7e78008eb1df97a93a849f89.tar.gz
rails-9b40f5cc36c38fca7e78008eb1df97a93a849f89.tar.bz2
rails-9b40f5cc36c38fca7e78008eb1df97a93a849f89.zip
Copy edit [ci skip]
Diffstat (limited to 'activerecord/lib/active_record/store.rb')
-rw-r--r--activerecord/lib/active_record/store.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/store.rb b/activerecord/lib/active_record/store.rb
index a67d6a2288..ce2ea85ef9 100644
--- a/activerecord/lib/active_record/store.rb
+++ b/activerecord/lib/active_record/store.rb
@@ -13,6 +13,9 @@ 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+.
#
+ # String keys should be used for direct access to virtual attributes because of most of the coders do not
+ # distinguish symbols and strings as keys.
+ #
# Examples:
#
# class User < ActiveRecord::Base
@@ -20,10 +23,8 @@ module ActiveRecord
# end
#
# u = User.new(color: 'black', homepage: '37signals.com')
- # u.color # Accessor stored attribute
+ # u.color # Accessor stored attribute
# u.settings['country'] = 'Denmark' # Any attribute, even if not specified with an accessor
- # String keys should be used for direct access to virtual attributes because of most of the coders do not
- # distinguish symbols and strings as keys.
#
# # Add additional accessors to an existing store through store_accessor
# class SuperUser < User