diff options
Diffstat (limited to 'activemodel/README')
-rw-r--r-- | activemodel/README | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/activemodel/README b/activemodel/README index 27121d2c03..95d1c63f75 100644 --- a/activemodel/README +++ b/activemodel/README @@ -141,4 +141,16 @@ functionality from the following modules: functions. {Learn more}[link:classes/ActiveModel/Observer.html] -
\ No newline at end of file + +* Making your object serializable + + ActiveModel::Serialization provides a standard interface for your object + to provide to_json or to_xml serialization... + + s = SerialPerson.new + s.serializable_hash # => {"name"=>nil} + s.to_json # => "{\"name\":null}" + s.to_xml # => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<serial-person... + + {Learn more}[link:classes/ActiveModel/Serialization.html] + |