Permalink
Browse files

ActiveRecord::Core#initialize: improve performance

  • Loading branch information...
1 parent 29094c0 commit 791251bf8b95debf2c3af61f1b675a30d1abf3fd @bogdan bogdan committed Mar 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/core.rb
View
2 activerecord/lib/active_record/core.rb
@@ -176,7 +176,7 @@ def initialize(attributes = nil, options = {})
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

0 comments on commit 791251b

Please sign in to comment.