You could make this shorter with map. Also, you should probably add a check for ids (eg `params.require(:ids)`)