Skip to content
This repository
Browse code

ActiveRecord::Core#initialize: improve performance

  • Loading branch information...
commit 791251bf8b95debf2c3af61f1b675a30d1abf3fd 1 parent 29094c0
Bogdan Gusiev authored March 15, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  activerecord/lib/active_record/core.rb
2  activerecord/lib/active_record/core.rb
@@ -176,7 +176,7 @@ def initialize(attributes = nil, options = {})
176 176
       assign_attributes(attributes, options) if attributes
177 177
 
178 178
       yield self if block_given?
179  
-      run_callbacks :initialize
  179
+      run_callbacks :initialize if _initialize_callbacks.any?
180 180
     end
181 181
 
182 182
     # Initialize an empty model object from +coder+. +coder+ must contain

0 notes on commit 791251b

Please sign in to comment.
Something went wrong with that request. Please try again.