```ruby
register_handler(Base, ->(attribute, value) { attribute.eq(value.id) })