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

update ActiveRecord::AttributeMethods::Serialization documentation [ci skip]

This commit is contained in:
Francesco Rodriguez 2013-04-04 21:08:29 -05:00
parent 1df502e000
commit 525ffc52fb

View file

@ -11,6 +11,12 @@ module ActiveRecord
end end
module ClassMethods module ClassMethods
##
# :method: serialized_attributes
#
# Returns a hash of all the attributes that have been specified for
# serialization as keys and their class restriction as values.
# If you have an attribute that needs to be saved to the database as an # If you have an attribute that needs to be saved to the database as an
# object, and retrieved as the same object, then specify the name of that # object, and retrieved as the same object, then specify the name of that
# attribute using this method and it will be handled automatically. The # attribute using this method and it will be handled automatically. The
@ -44,6 +50,7 @@ module ActiveRecord
end end
end end
# *DEPRECATED*: Use ActiveRecord::AttributeMethods::Serialization::ClassMethods#serialized_attributes class level method instead.
def serialized_attributes def serialized_attributes
message = "Instance level serialized_attributes method is deprecated, please use class level method." message = "Instance level serialized_attributes method is deprecated, please use class level method."
ActiveSupport::Deprecation.warn message ActiveSupport::Deprecation.warn message