Skip to content

Fix 404 when removing a staff tagging - #2807

Merged
maebeale merged 1 commit into
mainfrom
maebeale/404-error-staff-tagging-delete
Oct 23, 2026
Merged

maebeale merged 1 commit into
mainfrom
maebeale/404-error-staff-tagging-delete

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 3 Read 📖 one-line view fix plus a contained redirect change

Clicking "Remove tagging" on a staff tagging's edit page hit a 404 instead of deleting it.

What is the goal of this PR and why is this important?

  • The link sits inside a turbo: false form.
    • Turbo ignored its turbo_method: :delete.
    • Browser sent a plain GET to /staff_taggings/:id — no show route → 404.
  • Same data: { turbo: true } override event_registrations/_form and comments/_delete_link already use.

How did you approach the change?

  • Link re-enables Turbo and carries the return_to / origin_id / admin params.
  • destroy now redirects via staff_tagging_return_path, matching the eyebrow.
    • Previously always landed on the staff taggings list, even when removed from a person or staff tag page.
  • System spec reproduces the click (failed before the fix).

UI Testing Checklist

  • Remove a tagging from a person's edit page → lands back on the person
  • Remove from a staff tag page → lands back on that tag
  • Remove from the staff taggings list → lands back on the list

Anything else to add?

  • workshops/_form has the same pattern (Delete link inside a turbo: false form) — likely the same 404; not touched here.

🤖 Generated with Claude Code

The Remove link sits inside a turbo: false form, so Turbo ignored its
turbo_method: :delete and the browser sent a plain GET to a route with no
show action. Re-enable Turbo on the link, and send the user back to the
page they came from after removal, matching the eyebrow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@maebeale
maebeale marked this pull request as ready for review October 23, 2026 15:56
@maebeale
maebeale merged commit aa206f3 into main Oct 23, 2026
3 checks passed
@maebeale
maebeale deleted the maebeale/404-error-staff-tagging-delete branch October 23, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant