Browse files

revised titles in validation and callbacks guide

  • Loading branch information...
1 parent abe921f commit 66f5502fcca96c6005ddb8a254283a2df11792b3 @fxn fxn committed Mar 14, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/guides/source/activerecord_validations_callbacks.textile
@@ -1030,7 +1030,7 @@ h3. Observers
Observers are similar to callbacks, but with important differences. Whereas callbacks can pollute a model with code that isn't directly related to its purpose, observers allow you to add the same functionality outside of a model. For example, it could be argued that a +User+ model should not include code to send registration confirmation emails. Whenever you use callbacks with code that isn't directly related to your model, you may want to consider creating an observer instead.
-h4. Creating observers
+h4. Creating Observers
For example, imagine a +User+ model where we want to send an email every time a new user is created. Because sending emails is not directly related to our model's purpose, we could create an observer to contain this functionality.

0 comments on commit 66f5502

Please sign in to comment.