I think this is simpler:

```ruby
changes.each do |key, value|
  changes[key] = value.first
end

changes
```

If above doesn't work due to loop side effects, below is still simpler than current:

```ruby
changes.keys.each do |attr|
  changes[attr] = changes[attr].first
end

changes
```