Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #5467 from bogdan/initialize_callbacks

ActiveRecord::Core#initialize: improve performance
  • Loading branch information...
commit 6d0047aff8b7c333625d3a4b97dfa3e8a63588e2 2 parents f5b9dd3 + 791251b
@josevalim josevalim authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.