mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
And owner_quoted_id can go too
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user