Since you're deleting all parameters with that key, this can replace proposed lines 267-273
``` ruby
node.parameters.find_all_by_key(key).map(&:destroy)
```