When I run this code:
@test = InstanceName.find_by(instance_number: "25", project_id: "4") @test.destroy
The SQL query that Rails tries to execute is this:
DELETE FROM "instance_names" WHERE "instance_names"."" IS NULL
But the one it should be doing is this, right?
DELETE FROM instance_names WHERE instance_number = '25' AND project_id = '4'
Since it’s trying to execute the above, I always get the error: SQLite3::SQLException: no such column: instance_names.
Is this a bug, or what is going on?