```Ruby
allowed_opts = [:id, :name]
opts.reject! { |k| !allowed_opts.include? k }
```