# File lib/active_record/base.rb, line 2482 def initialize(attributes = nil) @attributes = attributes_from_column_definition @attributes_cache = {} @new_record = true ensure_proper_type self.attributes = attributes unless attributes.nil? assign_attributes(self.class.send(:scope, :create)) if self.class.send(:scoped?, :create) result = yield self if block_given? callback(:after_initialize) if respond_to_without_attributes?(:after_initialize) result end