aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-04-25 17:42:44 -0700
committerGitHub <noreply@github.com>2017-04-25 17:42:44 -0700
commita3c7fe06be9d5e69656a4f196f6de6f1cd623f96 (patch)
treebaf7fa62450c0b77d1dc3d4a330714734bfc16fd /activerecord/test
parentc7ee244644903da5045c54f72e25a8ee6eb3bd68 (diff)
parent22fa48f2fc1c4d71d42eaed41ea1ef9af618d585 (diff)
downloadrails-a3c7fe06be9d5e69656a4f196f6de6f1cd623f96.tar.gz
rails-a3c7fe06be9d5e69656a4f196f6de6f1cd623f96.tar.bz2
rails-a3c7fe06be9d5e69656a4f196f6de6f1cd623f96.zip
Merge pull request #28828 from kamipo/fix_extending_modules_on_association
Mixin `CollectionProxy::DelegateExtending` after `ClassSpecificRelation`
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/models/comment.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/models/comment.rb b/activerecord/test/models/comment.rb
index a4b81d56e0..76b484e616 100644
--- a/activerecord/test/models/comment.rb
+++ b/activerecord/test/models/comment.rb
@@ -19,6 +19,11 @@ class Comment < ActiveRecord::Base
has_many :children, class_name: "Comment", foreign_key: :parent_id
belongs_to :parent, class_name: "Comment", counter_cache: :children_count
+ # Should not be called if extending modules that having the method exists on an association.
+ def self.greeting
+ raise
+ end
+
def self.what_are_you
"a comment..."
end