diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-05-11 19:42:53 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-05-11 20:11:04 +0100 |
commit | be7c6ee56d40b2205cb071b8d616191eac292ce8 (patch) | |
tree | 1b13e6179f0494fd572b2134caf78ab3addc7591 /activerecord | |
parent | 8f50bbee31ca4b2cc2ac9b9889c421f6a38d97f4 (diff) | |
download | rails-be7c6ee56d40b2205cb071b8d616191eac292ce8.tar.gz rails-be7c6ee56d40b2205cb071b8d616191eac292ce8.tar.bz2 rails-be7c6ee56d40b2205cb071b8d616191eac292ce8.zip |
extract deprecated code
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_proxy.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index 66815d83bc..96911d1d79 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -82,14 +82,7 @@ module ActiveRecord end def method_missing(method, *args, &block) - match = DynamicMatchers::Method.match(self, method) - if match && match.is_a?(DynamicMatchers::Instantiator) - super do |record| - proxy_association.add_to_target(record) - yield record if block_given? - end - - elsif target.respond_to?(method) || (!proxy_association.klass.respond_to?(method) && Class.respond_to?(method)) + if target.respond_to?(method) || (!proxy_association.klass.respond_to?(method) && Class.respond_to?(method)) if load_target if target.respond_to?(method) target.send(method, *args, &block) |