提交 32a5cad1 编写于 作者: J Jon Leighton

Move #proxy_association method to AssociationRelation

上级 1b022990
......@@ -5,6 +5,10 @@ def initialize(klass, table, association)
@association = association
end
def proxy_association
@association
end
private
def exec_queries
......
......@@ -847,9 +847,7 @@ def scoping
# Returns a <tt>Relation</tt> object for the records in this association
def scope
@association.scope.tap do |scope|
scope.proxy_association = @association
end
@association.scope
end
# :nodoc:
......
......@@ -17,7 +17,7 @@ class Relation
include FinderMethods, Calculations, SpawnMethods, QueryMethods, Batches, Explain, Delegation
attr_reader :table, :klass, :loaded
attr_accessor :default_scoped, :proxy_association
attr_accessor :default_scoped
alias :model :klass
alias :loaded? :loaded
alias :default_scoped? :default_scoped
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册