diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-12-30 20:43:55 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2010-12-31 20:00:44 +0000 |
commit | 6db908515919a22c475bec2dd0ddc157e7933f3d (patch) | |
tree | 662bd25081a1be9468a13455206fe65d523842da /activerecord/lib/active_record/associations | |
parent | b0bb911fa1923d809b6e4fc120cc1adc0b8dc321 (diff) | |
download | rails-6db908515919a22c475bec2dd0ddc157e7933f3d.tar.gz rails-6db908515919a22c475bec2dd0ddc157e7933f3d.tar.bz2 rails-6db908515919a22c475bec2dd0ddc157e7933f3d.zip |
And owner_quoted_id can go too
Diffstat (limited to 'activerecord/lib/active_record/associations')
3 files changed, 0 insertions, 22 deletions
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index 6720d83199..97eab8a793 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -282,11 +282,6 @@ module ActiveRecord end end - # Returns the ID of the owner, quoted if needed. - def owner_quoted_id - @owner.quoted_id - end - # Can be redefined by subclasses, notably polymorphic belongs_to # The record parameter is necessary to support polymorphic inverses as we must check for # the association in the specific class of the record. diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb index c3360463cd..a0e2e8b479 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -7,14 +7,6 @@ module ActiveRecord # is provided by its child HasManyThroughAssociation. class HasManyAssociation < AssociationCollection #:nodoc: protected - def owner_quoted_id - if @reflection.options[:primary_key] - @owner.class.quote_value(@owner.send(@reflection.options[:primary_key])) - else - @owner.quoted_id - end - end - # Returns the number of records in this collection. # # If the association has a counter cache it gets that value. Otherwise diff --git a/activerecord/lib/active_record/associations/has_one_association.rb b/activerecord/lib/active_record/associations/has_one_association.rb index c32aaf986e..04cb16b909 100644 --- a/activerecord/lib/active_record/associations/has_one_association.rb +++ b/activerecord/lib/active_record/associations/has_one_association.rb @@ -65,15 +65,6 @@ module ActiveRecord end end - protected - def owner_quoted_id - if @reflection.options[:primary_key] - @owner.class.quote_value(@owner.send(@reflection.options[:primary_key])) - else - @owner.quoted_id - end - end - private def find_target options = @reflection.options.dup.slice(:select, :order, :include, :readonly) |