1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Copy edit [ci skip]

This commit is contained in:
Rafael Mendonça França 2012-05-13 19:04:33 -03:00
parent f443e119cd
commit 9b40f5cc36
2 changed files with 5 additions and 3 deletions

View file

@ -1,4 +1,5 @@
## Rails 4.0.0 (unreleased) ##
* Added custom coders support for ActiveRecord::Store. Now you can set
your custom coder like this:

View file

@ -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