Permalink
Browse files

Adds title to the rest of the files in activerecord/lib

  • Loading branch information...
1 parent 4e3eec3 commit 6445441253711d9131fa859115dd8224ea31eeee @rizwanreza rizwanreza committed Jun 16, 2010
Showing with 7 additions and 2 deletions.
  1. +4 −2 activerecord/lib/active_record/transactions.rb
  2. +3 −0 activerecord/lib/active_record/validations.rb
@@ -11,15 +11,17 @@ class TransactionError < ActiveRecordError # :nodoc:
included do
define_callbacks :commit, :rollback, :terminator => "result == false", :scope => [:kind, :name]
end
-
+ # = Active Record Transactions
+ #
# Transactions are protective blocks where SQL statements are only permanent
# if they can all succeed as one atomic action. The classic example is a
# transfer between two accounts where you can only have a deposit if the
# withdrawal succeeded and vice versa. Transactions enforce the integrity of
# the database and guard the data against program errors or database
# break-downs. So basically you should use transaction blocks whenever you
# have a number of statements that must be executed together or not at all.
- # Example:
+ #
+ # For example:
#
# ActiveRecord::Base.transaction do
# david.withdrawal(100)
@@ -1,6 +1,9 @@
module ActiveRecord
+ # = Active Record Validations
+ #
# Raised by <tt>save!</tt> and <tt>create!</tt> when the record is invalid. Use the
# +record+ method to retrieve the record which did not validate.
+ #
# begin
# complex_operation_that_calls_save!_internally
# rescue ActiveRecord::RecordInvalid => invalid

0 comments on commit 6445441

Please sign in to comment.