From 9c3afdc327132c7f1f4d05eebc0c05b715442e7d Mon Sep 17 00:00:00 2001 From: Jefferson Lai Date: Mon, 10 Feb 2014 03:00:05 -0800 Subject: Fixes Issue #13466. Changed the call to a scope block to be evaluated with instance_eval. The result is that ScopeRegistry can use the actual class instead of base_class when caching scopes so queries made by classes with a common ancestor won't leak scopes. --- activerecord/test/models/rating.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/test/models/rating.rb') diff --git a/activerecord/test/models/rating.rb b/activerecord/test/models/rating.rb index 25a52c4ad7..5409230c2e 100644 --- a/activerecord/test/models/rating.rb +++ b/activerecord/test/models/rating.rb @@ -2,3 +2,7 @@ class Rating < ActiveRecord::Base belongs_to :comment has_many :taggings, :as => :taggable end + +class SpecialRating < Rating + belongs_to :special_comment +end -- cgit v1.2.3