Getting this error message when trying to delete a challenge model.
We thought it was the fact that we had a $_belongs_to relationship from the type to the challenge so we removed it but that doesn't seem to be the case.
Any help is greatly appreciated and if you have any questions, please ask.
1. you ALWAYS need to define the relation both ways. And your "type" model is missing the definition. 2. the rule for defining relations is that the "belongs_to" side of the relation ALWAYS has the foreign key.
which indicates this model has the FK, and the PK is in the related model. Which means this should be a "belongs_to", and the related model needs a "has_one".