aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures
diff options
context:
space:
mode:
authorDave Desrochers <dave726@gmail.com>2012-02-28 10:20:27 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-21 14:10:11 -0300
commitff0d9b93b9074c479dd6de657c71812f0ac40cbe (patch)
treedfad842195953c034096ef46e8d0c305f37499aa /activerecord/test/fixtures
parentce0dd56183d198739638c2cfa7c17f90513a7072 (diff)
downloadrails-ff0d9b93b9074c479dd6de657c71812f0ac40cbe.tar.gz
rails-ff0d9b93b9074c479dd6de657c71812f0ac40cbe.tar.bz2
rails-ff0d9b93b9074c479dd6de657c71812f0ac40cbe.zip
reset_counters() was crashing when there were multiple belongs_to associations with the same foreign key.
This closes #5200.
Diffstat (limited to 'activerecord/test/fixtures')
-rw-r--r--activerecord/test/fixtures/friendships.yml4
-rw-r--r--activerecord/test/fixtures/people.yml3
2 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/friendships.yml b/activerecord/test/fixtures/friendships.yml
new file mode 100644
index 0000000000..1ee09175bf
--- /dev/null
+++ b/activerecord/test/fixtures/friendships.yml
@@ -0,0 +1,4 @@
+Connection 1:
+ id: 1
+ person_id: 1
+ friend_id: 2 \ No newline at end of file
diff --git a/activerecord/test/fixtures/people.yml b/activerecord/test/fixtures/people.yml
index 123673a2af..e640a38f1f 100644
--- a/activerecord/test/fixtures/people.yml
+++ b/activerecord/test/fixtures/people.yml
@@ -4,15 +4,18 @@ michael:
primary_contact_id: 2
number1_fan_id: 3
gender: M
+ followers_count: 1
david:
id: 2
first_name: David
primary_contact_id: 3
number1_fan_id: 1
gender: M
+ followers_count: 1
susan:
id: 3
first_name: Susan
primary_contact_id: 2
number1_fan_id: 1
gender: F
+ followers_count: 1