提交 77715951 编写于 作者: A Angelo Capilleri

target_reflection_has_associated_record? refactoring

上级 e5d4367e
......@@ -114,11 +114,7 @@ def build_record(attributes)
end
def target_reflection_has_associated_record?
if through_reflection.macro == :belongs_to && owner[through_reflection.foreign_key].blank?
false
else
true
end
!(through_reflection.macro == :belongs_to && owner[through_reflection.foreign_key].blank?)
end
def update_through_counter?(method)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册