ahcis-rds / study_finder

StudyFinder is a flexible and configurable application to pull studies from clinicaltrials.gov and augment the data from alternate datasources such as a clinical trials management system.
MIT License
17 stars 4 forks source link

Fix saving of Groups/Subgroups #62

Closed cdinger closed 4 years ago

cdinger commented 4 years ago

This reworks the subgroup saving. It was using the deprecated form of delete_all. delete_all has been removed altogether because the existing code had a few other issues:

This change builds up the set of subgroups on every save and calls an explicit save on the parent Group. I'd rather have used nested attributes on this, but didn't want to spend time reworking the select2 interface.