My AI assistant kept fixing Rails delete buttons with a JSON API. Here's the rule that stopped it.
Ask an AI coding assistant to fix a broken delete button in a Rails 8 app and there is a good chance you get something like this back: skip_forgery_protection only : :destroy def destroy @post . destroy render json : { ok : true } end Plus a new /api route and a Stimulus controller that calls fetch…
Read the full story at DEV Community — AI ↗
Timeline · 1 report
- 2026-12-04 01:33 · DEV Community — AI
My AI assistant kept fixing Rails delete buttons with a JSON API. Here's the rule that stopped it.