Added minor changes to get parameters from the request when doing an association.