aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorFred Wu <ifredwu@gmail.com>2014-05-08 15:57:49 +1000
committerFred Wu <ifredwu@gmail.com>2014-05-08 16:01:57 +1000
commitf045663dfc879b9516904255fb555f048c394b7b (patch)
tree2cc2ef7850f5b9d62cfa37ac57abce718dd2a233 /activerecord/test/models
parentd2061a224d4e99cbc0f859c50f0c35277773369e (diff)
downloadrails-f045663dfc879b9516904255fb555f048c394b7b.tar.gz
rails-f045663dfc879b9516904255fb555f048c394b7b.tar.bz2
rails-f045663dfc879b9516904255fb555f048c394b7b.zip
Fixed HABTM's CollectionAssociation size
HABTM should fall back to using the normal CollectionAssociation's size calculation if the collection is not cached or loaded. This addresses both #14913 and #14914 for master.
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/developer.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/developer.rb b/activerecord/test/models/developer.rb
index 762259ffa3..0a614c3bfd 100644
--- a/activerecord/test/models/developer.rb
+++ b/activerecord/test/models/developer.rb
@@ -13,6 +13,8 @@ class Developer < ActiveRecord::Base
end
end
+ accepts_nested_attributes_for :projects
+
has_and_belongs_to_many :projects_extended_by_name,
-> { extending(DeveloperProjectsAssociationExtension) },
:class_name => "Project",