aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/transactions.rb
diff options
context:
space:
mode:
authorRizwan Reza <rizwanreza@gmail.com>2010-06-16 22:25:15 +0430
committerRizwan Reza <rizwanreza@gmail.com>2010-06-16 22:25:15 +0430
commit6445441253711d9131fa859115dd8224ea31eeee (patch)
tree2024c8728597fdc014ead7a7a24442c1b5c57b36 /activerecord/lib/active_record/transactions.rb
parent4e3eec3d017df151ac3201be9b03f1f01c228ad3 (diff)
downloadrails-6445441253711d9131fa859115dd8224ea31eeee.tar.gz
rails-6445441253711d9131fa859115dd8224ea31eeee.tar.bz2
rails-6445441253711d9131fa859115dd8224ea31eeee.zip
Adds title to the rest of the files in activerecord/lib
Diffstat (limited to 'activerecord/lib/active_record/transactions.rb')
-rw-r--r--activerecord/lib/active_record/transactions.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/transactions.rb b/activerecord/lib/active_record/transactions.rb
index 620758f5af..b4b146994d 100644
--- a/activerecord/lib/active_record/transactions.rb
+++ b/activerecord/lib/active_record/transactions.rb
@@ -11,7 +11,8 @@ module ActiveRecord
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
@@ -19,7 +20,8 @@ module ActiveRecord
# 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)