From 542114e1d82fffa1062ef0eaa1053959ab9d14ec Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Wed, 25 May 2011 02:28:41 +0200 Subject: removed deprecated methods, and related tests, from ActiveRecord --- .../associations/builder/singular_association.rb | 13 ------------ .../active_record/associations/collection_proxy.rb | 24 ---------------------- 2 files changed, 37 deletions(-) (limited to 'activerecord/lib/active_record/associations') diff --git a/activerecord/lib/active_record/associations/builder/singular_association.rb b/activerecord/lib/active_record/associations/builder/singular_association.rb index 638a2ec72a..0cbbba041a 100644 --- a/activerecord/lib/active_record/associations/builder/singular_association.rb +++ b/activerecord/lib/active_record/associations/builder/singular_association.rb @@ -13,19 +13,6 @@ module ActiveRecord::Associations::Builder private - def define_readers - super - name = self.name - - model.redefine_method("#{name}_loaded?") do - ActiveSupport::Deprecation.warn( - "Calling obj.#{name}_loaded? is deprecated. Please use " \ - "obj.association(:#{name}).loaded? instead." - ) - association(name).loaded? - end - end - def define_constructors name = self.name diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index 8415942a1a..adfc71d435 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -123,30 +123,6 @@ module ActiveRecord method_missing(:new, *args, &block) end end - - def proxy_owner - ActiveSupport::Deprecation.warn( - "Calling record.#{@association.reflection.name}.proxy_owner is deprecated. Please use " \ - "record.association(:#{@association.reflection.name}).owner instead." - ) - @association.owner - end - - def proxy_target - ActiveSupport::Deprecation.warn( - "Calling record.#{@association.reflection.name}.proxy_target is deprecated. Please use " \ - "record.association(:#{@association.reflection.name}).target instead." - ) - @association.target - end - - def proxy_reflection - ActiveSupport::Deprecation.warn( - "Calling record.#{@association.reflection.name}.proxy_reflection is deprecated. Please use " \ - "record.association(:#{@association.reflection.name}).reflection instead." - ) - @association.reflection - end end end end -- cgit v1.2.3