}
render("Interests/merge.html", interests);
}
public static void merge(@As(",") Long[] interests, Long survivorInterestId) {
Interest survivorInterest = Interest.findById(survivorInterestId);
if (interests != null) {
for (Long interestToBeDeleted : interests) {
Interest i = Interest.findById(interestToBeDeleted);
i.merge(survivorInterest);
}
flash.success("Intérêts fusionnés");
}
edit();
}