aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-09-06 15:58:07 +0100
committerJon Leighton <j@jonathanleighton.com>2011-09-06 15:58:07 +0100
commitb24d668859c5836c0e3ed277b2022a1a39eb3f8e (patch)
tree9ba6b20c7bb26165953748e4ff9a5305c550575d /activerecord/test/models
parent9f3e732e65dfa978e036a3b0df3578b2d6a6510a (diff)
downloadrails-b24d668859c5836c0e3ed277b2022a1a39eb3f8e.tar.gz
rails-b24d668859c5836c0e3ed277b2022a1a39eb3f8e.tar.bz2
rails-b24d668859c5836c0e3ed277b2022a1a39eb3f8e.zip
Ensure we are not comparing a string with a symbol in HasManyAssociation#inverse_updates_counter_cache?. Fixes #2755, where a counter cache could be decremented twice as far as it was supposed to be.
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 76f20b1061..b9c2e8ec9a 100644
--- a/activerecord/test/models/car.rb
+++ b/activerecord/test/models/car.rb
@@ -8,7 +8,7 @@ class Car < ActiveRecord::Base
has_one :frickinawesome_bulb, :class_name => "Bulb", :conditions => { :frickinawesome => true }
has_many :tyres
- has_many :engines
+ has_many :engines, :dependent => :destroy
has_many :wheels, :as => :wheelable
scope :incl_tyres, includes(:tyres)