lib/hanami/model/associations/has_many.rb in hanami-model-1.1.0.beta1 vs lib/hanami/model/associations/has_many.rb in hanami-model-1.1.0.beta2

- old
+ new

@@ -65,12 +65,11 @@ end # @since 0.7.0 # @api private def remove(id) - target_relation = relation(target) - - command(:update, target_relation.where(target_relation.primary_key => id), use: [:timestamps]) + command(:update, relation(target), use: [:timestamps]) + .by_pk(id) .call(unassociate) end # @since 0.7.0 # @api private