From c48f744400844e4c73eb91c83d86c3e915a9d78b Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Sat, 26 Jan 2008 06:23:03 +0000 Subject: Make sure that belongs_to counter decrements when assigning nil Closes #10804 [jeanmartin] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8735 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/models/comment.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/test/models') diff --git a/activerecord/test/models/comment.rb b/activerecord/test/models/comment.rb index 60ca082c2e..73ebdadf73 100644 --- a/activerecord/test/models/comment.rb +++ b/activerecord/test/models/comment.rb @@ -1,5 +1,5 @@ class Comment < ActiveRecord::Base - belongs_to :post + belongs_to :post, :counter_cache => true def self.what_are_you 'a comment...' @@ -20,4 +20,4 @@ class VerySpecialComment < Comment def self.what_are_you 'a very special comment...' end -end \ No newline at end of file +end -- cgit v1.2.3