```ruby
return if @asset.class == klass
```

Since you clear the whole relationship you don't need old_class for anything.