提交 dbf9ec07 编写于 作者: W Wojtek Kruszewski

Prevent foreign_key_for? from type casting all attributes

上级 c93c558a
......@@ -232,7 +232,7 @@ def invertible_for?(record)
# Returns true if record contains the foreign_key
def foreign_key_for?(record)
record.attributes.has_key? reflection.foreign_key
record.has_attribute?(reflection.foreign_key)
end
# This should be implemented to return the values of the relevant key(s) on the owner,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册