aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorDmitry Polushkin <dmitry.polushkin@gmail.com>2011-09-09 08:31:54 +0100
committerDmitry Polushkin <dmitry.polushkin@gmail.com>2011-09-09 08:31:54 +0100
commitedd2f21e8095fe4a38e812025b4d9fd0e0cc28f1 (patch)
treef5c6e656d2961e727c8de1c6aea846ad9f9c54c3 /activerecord/test/models
parentac1a363c6ed889d11e8fabd6dd69a8a6df9e3cfd (diff)
downloadrails-edd2f21e8095fe4a38e812025b4d9fd0e0cc28f1.tar.gz
rails-edd2f21e8095fe4a38e812025b4d9fd0e0cc28f1.tar.bz2
rails-edd2f21e8095fe4a38e812025b4d9fd0e0cc28f1.zip
Test polymorphic record with optimistic locking and counter cache should be destoyed without catching the ActiveRecord::StaleObjectError.
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/car.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/models/car.rb b/activerecord/test/models/car.rb
index b9c2e8ec9a..6ff1329d8e 100644
--- a/activerecord/test/models/car.rb
+++ b/activerecord/test/models/car.rb
@@ -9,7 +9,7 @@ class Car < ActiveRecord::Base
has_many :tyres
has_many :engines, :dependent => :destroy
- has_many :wheels, :as => :wheelable
+ has_many :wheels, :as => :wheelable, :dependent => :destroy
scope :incl_tyres, includes(:tyres)
scope :incl_engines, includes(:engines)