From 7ad83b8df2d1b4d4a6ec81903eac48b7248ebd89 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 1 Jan 2005 16:14:15 +0000 Subject: Added block-style for callbacks #332 [bitsweat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@296 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/CHANGELOG | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'activerecord/CHANGELOG') diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 8a0d75ee8a..2de7f35a64 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,13 @@ *SVN* +* Added block-style for callbacks #332 [bitsweat]. + + Before: + before_destroy(Proc.new{ |record| Person.destroy_all "firm_id = #{record.id}" }) + + After: + before_destroy { |record| Person.destroy_all "firm_id = #{record.id}" } + * Added automated optimistic locking if the field lock_version is present. Each update to the record increments the lock_version column and the locking facilities ensure that records instantiated twice will let the last one saved raise a StaleObjectError if the first was also updated. Example: @@ -675,7 +683,7 @@ * Fixed PostgreSQL adapter so default values are displayed properly when used in conjunction with Action Pack scaffolding. -* Fixed booleans support for PostgreSQL (use real true/false on boolean fields instead of 0/1 on tinyints) [radsaq] +* Fixed booleans support for PostgreSQL (use real true/falseĀ on boolean fields instead of 0/1 on tinyints) [radsaq] *0.9.2* -- cgit v1.2.3