From 23e434f08fa756e9a8c472a8212c6f72ac92b32b Mon Sep 17 00:00:00 2001 From: Mikel Lindsaar Date: Fri, 15 Jan 2010 08:29:08 +1100 Subject: ActiveModel::Conversion documentation --- activemodel/README | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'activemodel/README') diff --git a/activemodel/README b/activemodel/README index 1d987605c0..c0d59f7208 100644 --- a/activemodel/README +++ b/activemodel/README @@ -13,7 +13,7 @@ to then present a common interface to the Action Pack helpers. You can include functionality from the following modules: -* Callbacks +* Adding callbacks to your class class MyClass extend ActiveModel::Callbacks @@ -31,3 +31,11 @@ You can include functionality from the following modules: {Learn more}[link:classes/ActiveModel/CallBacks.html] +* For classes that already look like an Active Record object + + class MyClass + include ActiveModel::Conversion + end + + ...returns the class itself when sent :to_model + -- cgit v1.2.3