From 791251bf8b95debf2c3af61f1b675a30d1abf3fd Mon Sep 17 00:00:00 2001 From: Bogdan Gusiev Date: Thu, 15 Mar 2012 10:24:13 +0200 Subject: [PATCH] ActiveRecord::Core#initialize: improve performance --- activerecord/lib/active_record/core.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 46aababfb6..9a2f859fc7 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -176,7 +176,7 @@ module ActiveRecord assign_attributes(attributes, options) if attributes yield self if block_given? - run_callbacks :initialize + run_callbacks :initialize if _initialize_callbacks.any? end # Initialize an empty model object from +coder+. +coder+ must contain