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.
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:
Subgroups would not save if nothing else on the group changed.
Subgroup saving was wrapped in params[:tags].nil? but this is never
the case in the real world. Empty tags came through as [""].
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.
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:params[:tags].nil?
but this is never the case in the real world. Empty tags came through as[""]
.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.