提交 93641ed6 编写于 作者: S Stian Grytøyr 提交者: Aaron Patterson

Fixes performance issue introduced in 3.0.6 (issue #6695)

上级 fb6fa1e4
......@@ -84,9 +84,11 @@ def define_read_method(symbol, attr_name, column)
# Returns the value of the attribute identified by <tt>attr_name</tt> after it has been typecast (for example,
# "2004-12-12" in a data column is cast to a date object, like Date.new(2004, 12, 12)).
def read_attribute(attr_name)
send "_#{attr_name}"
rescue NoMethodError
_read_attribute attr_name
if respond_to? "_#{attr_name}"
send "_#{attr_name}"
else
_read_attribute attr_name
end
end
def _read_attribute(attr_name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册