From fa8c525d20ff14e4a9d367d2845b446267065bcc Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sat, 22 Apr 2017 16:28:20 +0900 Subject: Fix `automatic_inverse_of` not to be disabled if extension block is given If an association has a scope, `automatic_inverse_of` is to be disabled. But extension block is obviously not a scope. It should not be regarded as a scope. Fixes #28806. --- activerecord/test/models/post.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/test/models') diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb index 395b534c63..c34968590f 100644 --- a/activerecord/test/models/post.rb +++ b/activerecord/test/models/post.rb @@ -11,6 +11,10 @@ class Post < ActiveRecord::Base def author "lifo" end + + def greeting + super + " :)" + end end module NamedExtension2 -- cgit v1.2.3