Use #each instead of #map where appropriated

This commit is contained in:
gregoirenovel 2017-04-05 10:00:15 +02:00
parent a309f07771
commit 9071656b55

View file

@ -15,8 +15,8 @@ class Users::CarteController < UsersController
def save
dossier = current_user_dossier
dossier.quartier_prioritaires.map(&:destroy)
dossier.cadastres.map(&:destroy)
dossier.quartier_prioritaires.each(&:destroy)
dossier.cadastres.each(&:destroy)
unless params[:json_latlngs].blank?
ModuleApiCartoService.save_qp! dossier, params[:json_latlngs]