I feel like I'm missing something very obvious, but what I'm doing is testing the destroy
route on my User model.
When I try and @user.destroy
, I get the following exception:
*** ActiveRecord::InvalidForeignKey Exception: SQLite3::ConstraintException: FOREIGN KEY constraint failed: DELETE FROM "users" WHERE "users"."id" = ?
The only problem is, I already have dependent: :destroy
in place for the has_many
association, and I have also tried :delete_all
to no avail. This is the only association I have to this model right now.
Any ideas? I'm sure its something simple