aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-02-21 22:13:39 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-02-21 22:13:39 +0000
commit25bb98e42daa98c4207ea19bb80525d2b7cf8962 (patch)
tree72987b98040a64fe355540b780da0209ab2af0ae /activerecord/CHANGELOG
parent7842caed942d5a410dcc0c22f2d3dfd808fa0cfa (diff)
downloadrails-25bb98e42daa98c4207ea19bb80525d2b7cf8962.tar.gz
rails-25bb98e42daa98c4207ea19bb80525d2b7cf8962.tar.bz2
rails-25bb98e42daa98c4207ea19bb80525d2b7cf8962.zip
Added database connection as a yield parameter to ActiveRecord::Base.transaction so you can manually rollback [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6196 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/CHANGELOG')
-rw-r--r--activerecord/CHANGELOG8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index ed1b83cdca..dade34a38b 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,13 @@
*SVN*
+* Added database connection as a yield parameter to ActiveRecord::Base.transaction so you can manually rollback [DHH]. Example:
+
+ transaction do |transaction|
+ david.withdrawal(100)
+ mary.deposit(100)
+ transaction.rollback! # rolls back the transaction that was otherwise going to be successful
+ end
+
* Made increment_counter/decrement_counter play nicely with optimistic locking, and added a more general update_counters method [Jamis Buck]
* Reworked David's query cache to be available as Model.cache {...}. For the duration of the block no select query should be run more then once. Any inserts/deletes/executes will flush the whole cache however [Tobias Luetke]