ActiveRecord::RecordNotDestroyed: Projects::Ml::CandidatesController#destroy
ActiveRecord::RecordNotDestroyed
Projects::Ml::CandidatesController#destroy
Failed to destroy Ml::Candidate with id=xxxx (ActiveRecord::RecordNotDestroyed)
app/controllers/projects/ml/candidates_controller.rb in destroy at line 18
def destroy
@experiment = @candidate.experiment
@candidate.destroy!
redirect_to project_ml_experiment_path(@project, @experiment.iid),
Proposal
Instead of an exception we should return a failure like a rejection
Edited by Alper Akgun