# File lib/dm-core/collection.rb, line 838 def update!(attributes) assert_update_clean_only(:update!) model = self.model dirty_attributes = model.new(attributes).dirty_attributes if dirty_attributes.empty? true elsif dirty_attributes.any? { |property, value| !property.valid?(value) } false else unless _update(dirty_attributes) return false end if loaded? each do |resource| dirty_attributes.each { |property, value| property.set!(resource, value) } repository.identity_map(model)[resource.key] = resource end end true end end