diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-06-30 14:33:37 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-06-30 15:31:23 -0700 |
commit | 6a283d598f243197375266c8b981b66f1b5f10c5 (patch) | |
tree | 09e037cd65f90f00c92f39847f79fbcd8613dd42 /activerecord/lib | |
parent | 8e19a5dc4c9d69adc69f52f1377c174a8d5bf751 (diff) | |
download | rails-6a283d598f243197375266c8b981b66f1b5f10c5.tar.gz rails-6a283d598f243197375266c8b981b66f1b5f10c5.tar.bz2 rails-6a283d598f243197375266c8b981b66f1b5f10c5.zip |
match method signature of the superclass
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_proxy.rb | 6 | ||||
-rw-r--r-- | activerecord/lib/active_record/attribute_methods.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index 5267116c42..7f7dec467a 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -58,10 +58,10 @@ module ActiveRecord alias_method :new, :build - def respond_to?(*args) + def respond_to?(name, include_private = false) super || - (load_target && target.respond_to?(*args)) || - @association.klass.respond_to?(*args) + (load_target && target.respond_to?(name, include_private)) || + @association.klass.respond_to?(name, include_private) end def method_missing(method, *args, &block) diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index 5833c65893..d0687ed0b6 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -61,7 +61,7 @@ module ActiveRecord end end - def respond_to?(*args) + def respond_to?(name, include_private = false) self.class.define_attribute_methods unless self.class.attribute_methods_generated? super end |