Support #to_param object as relation parameters.