提交 fdd537e7 编写于 作者: A Aaron Patterson

removing unused code

上级 d7877ffc
......@@ -2210,7 +2210,7 @@ def build_has_many(aliased_table, parent_table)
:as => aliased_join_table_name,
:engine => arel_engine)
jt_foreign_key = jt_as_extra = jt_source_extra = jt_sti_extra = nil
first_key = second_key = as_extra = nil
first_key = second_key = nil
if through_reflection.options[:as] # has_many :through against a polymorphic join
jt_foreign_key = through_reflection.options[:as].to_s + '_id'
......@@ -2225,7 +2225,6 @@ def build_has_many(aliased_table, parent_table)
if source_reflection.options[:as]
first_key = "#{source_reflection.options[:as]}_id"
as_extra = aliased_table["#{source_reflection.options[:as]}_type"].eq(source_reflection.active_record.base_class.name)
else
first_key = through_reflection.klass.base_class.to_s.foreign_key
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册