提交 09dfabcc 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #30231 from kamipo/remove_unused_source_type_info

Remove unused `source_type_info` in `RuntimeReflection`
......@@ -1077,15 +1077,16 @@ def constraints
@reflection.constraints + [source_type_info]
end
def source_type_info
type = @previous_reflection.foreign_type
source_type = @previous_reflection.options[:source_type]
lambda { |object| where(type => source_type) }
end
def get_join_keys(association_klass)
@reflection.get_join_keys(association_klass)
end
private
def source_type_info
type = @previous_reflection.foreign_type
source_type = @previous_reflection.options[:source_type]
lambda { |object| where(type => source_type) }
end
end
class RuntimeReflection < PolymorphicReflection # :nodoc:
......@@ -1104,10 +1105,6 @@ def constraints
@reflection.constraints
end
def source_type_info
@reflection.source_type_info
end
def alias_candidate(name)
"#{plural_name}_#{name}_join"
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册