<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,17 @@
 module MongoMapper
+  # This module is mixed into the Document module to provide call-backs before 
+  # and after the following events:
+  #
+  # * save
+  # * create
+  # * update
+  # * validation
+  # ** every validation
+  # ** validation when created
+  # ** validation when updated
+  # * destruction
+  #
+  # @see ActiveSupport::Callbacks
   module Callbacks
     def self.included(model) #:nodoc:
       model.class_eval do
@@ -42,6 +55,11 @@ module MongoMapper
       return result
     end
 
+    # Here we override the +destroy+ method to allow for the +before_destroy+ 
+    # and +after_destroy+ call-backs. Note that the +destroy+ call is aborted 
+    # if the +before_destroy+ call-back returns +false+.
+    #
+    # @return the result of calling +destroy+ on the document
     def destroy #:nodoc:
       return false if callback(:before_destroy) == false
       result = super</diff>
      <filename>lib/mongo_mapper/callbacks.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e17f0f16a5b23e9459502e33a3a6d8662feb8e36</id>
    </parent>
  </parents>
  <author>
    <name>James Herdman</name>
    <email>james.herdman@gmail.com</email>
  </author>
  <url>http://github.com/collectiveidea/mongomapper/commit/c6c36e1051948f27aabd12e1b7f8080dfb143661</url>
  <id>c6c36e1051948f27aabd12e1b7f8080dfb143661</id>
  <committed-date>2009-10-19T21:59:06-07:00</committed-date>
  <authored-date>2009-10-19T21:59:06-07:00</authored-date>
  <message>Some progress I've made towards documenting callbacks</message>
  <tree>ffcc0578dfce2db79296f118421a8de6160f85bb</tree>
  <committer>
    <name>James Herdman</name>
    <email>james.herdman@gmail.com</email>
  </committer>
</commit>
