Move #encode_with to Relation