diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-05-16 12:10:37 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-05-28 01:18:13 +0900 |
commit | 9b78974bc9f0dad0242d057b69f543471af2b92d (patch) | |
tree | fbc3922b2f0e6c708635e94fa9c449c09e6f03f1 /activerecord/lib/active_record/relation | |
parent | fcc47bcfccc7578aa0414710eecdad006085a911 (diff) | |
download | rails-9b78974bc9f0dad0242d057b69f543471af2b92d.tar.gz rails-9b78974bc9f0dad0242d057b69f543471af2b92d.tar.bz2 rails-9b78974bc9f0dad0242d057b69f543471af2b92d.zip |
Fix association with extension issues
This fixes the following issues.
* `association_scope` doesn't include `default_scope`. Should use `scope` instead.
* We can't use `method_missing` for customizing existing method.
* We can't use `relation_delegate_class` for sharing extensions. Should extend per association.
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/delegation.rb | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/delegation.rb b/activerecord/lib/active_record/relation/delegation.rb index 257ae04ff4..8b4dd25689 100644 --- a/activerecord/lib/active_record/relation/delegation.rb +++ b/activerecord/lib/active_record/relation/delegation.rb @@ -25,8 +25,6 @@ module ActiveRecord def inherited(child_class) child_class.initialize_relation_delegate_cache - delegate = child_class.relation_delegate_class(ActiveRecord::Associations::CollectionProxy) - delegate.include ActiveRecord::Associations::CollectionProxy::DelegateExtending super end end |