From 746fed22ff5aebe372f55c083bbf0682d02e0381 Mon Sep 17 00:00:00 2001 From: CassioMarques Date: Tue, 4 Nov 2008 22:24:29 -0200 Subject: Initial commit for Active Record validations and callbacks guide --- .../html/activerecord_validations_callbacks.html | 267 +++++++++++++++++++++ railties/doc/guides/html/index.html | 10 +- .../source/activerecord_validations_callbacks.txt | 25 ++ 3 files changed, 300 insertions(+), 2 deletions(-) create mode 100644 railties/doc/guides/html/activerecord_validations_callbacks.html create mode 100644 railties/doc/guides/source/activerecord_validations_callbacks.txt (limited to 'railties') diff --git a/railties/doc/guides/html/activerecord_validations_callbacks.html b/railties/doc/guides/html/activerecord_validations_callbacks.html new file mode 100644 index 0000000000..c9128a8533 --- /dev/null +++ b/railties/doc/guides/html/activerecord_validations_callbacks.html @@ -0,0 +1,267 @@ + + + + + Active Record Validations and Callbacks + + + + + + + + + +
+ + + +
+

Active Record Validations and Callbacks

+
+
+

This guide teaches you how to work with the lifecycle of your Active Record objects. More precisely, you will learn how to validate the state of your objects before they go into the database and also how to teach them to perform custom operations at certain points of their lifecycles.

+

After reading this guide and trying out the presented concepts, we hope that you'll be able to:

+
    +
  • +

    +Correctly use all the built-in Active Record validation helpers +

    +
  • +
  • +

    +Create your own custom validation methods +

    +
  • +
  • +

    +Work with the error messages generated by the validation proccess +

    +
  • +
  • +

    +Register callback methods that will execute custom operations during your objects lifecycle, for example before/after they are saved. +

    +
  • +
  • +

    +Create special classes that encapsulate common behaviour for your callbacks +

    +
  • +
  • +

    +Create Observers - classes with callback methods specific for each of your models, keeping the callback code outside your models' declarations. +

    +
  • +
+
+
+

1. Active Record Validations

+
+
+

2. Credits

+
+
+

3. Changelog

+ + +
+
+ + diff --git a/railties/doc/guides/html/index.html b/railties/doc/guides/html/index.html index 84618d95e2..f8d14ffdd5 100644 --- a/railties/doc/guides/html/index.html +++ b/railties/doc/guides/html/index.html @@ -179,7 +179,7 @@ ul#navMain { -