提交 bcc3192e 编写于 作者: S Sean Griffin

Merge pull request #21855 from acapilleri/save_perf

Add Singleton in NullMutationTracker class
......@@ -133,7 +133,7 @@ def store_original_attributes
end
def previous_mutation_tracker
@previous_mutation_tracker ||= NullMutationTracker.new
@previous_mutation_tracker ||= NullMutationTracker.instance
end
def cache_changed_attributes
......
......@@ -46,6 +46,8 @@ def attr_names
end
class NullMutationTracker # :nodoc:
include Singleton
def changed_values
{}
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册