pro3958
150e659846
fix(tags): return 404 for missing or cross-family tag deletion ( #2703 )
...
Tag::DeletionsController looked up the tag and its replacement with
find_by, so a missing id or a tag belonging to another family left
@tag nil. create then called @tag.replace_and_destroy!, raising
NoMethodError and returning a 500 instead of a 404.
Use find in set_tag and set_replacement_tag so an out-of-scope id
raises ActiveRecord::RecordNotFound, which is rendered as 404. The
replacement lookup keeps a presence guard so deleting without a
replacement still works. This mirrors Category::DeletionsController.
Fixes #2469
Co-authored-by: agentloop <agentloop@localhost>
2026-07-30 07:15:50 +02:00
..
2026-06-06 09:14:50 +02:00
2026-07-26 01:42:18 +02:00
2026-04-19 18:40:50 +02:00
2026-07-08 08:10:18 +02:00
2026-06-16 08:32:17 +02:00
2026-07-26 07:31:25 +02:00
2026-07-30 07:15:50 +02:00
2026-07-17 07:19:57 +02:00
2026-05-13 21:05:11 +02:00
2026-06-02 18:47:09 +02:00
2026-07-30 03:42:50 +02:00
2026-06-02 21:44:57 +02:00
2026-03-14 20:14:18 +01:00
2026-05-27 23:58:00 +02:00
2026-05-13 18:13:48 +02:00
2026-05-01 00:59:48 +02:00
2026-06-01 21:59:46 +02:00
2025-05-27 05:04:58 -05:00
2026-01-21 22:56:39 +01:00
2026-04-19 18:40:50 +02:00
2026-07-21 09:15:24 +02:00
2026-02-19 19:51:42 +01:00
2025-05-15 10:19:56 -04:00
2026-07-17 07:22:50 +02:00
2026-06-04 19:53:52 +02:00
2026-04-08 21:05:58 +02:00
2026-07-17 06:57:54 +02:00
2026-07-26 01:38:31 +02:00
2026-06-02 14:00:16 +02:00
2026-06-04 11:52:28 +02:00
2026-03-06 10:05:52 +01:00
2026-05-12 23:45:19 +02:00
2026-03-25 10:50:23 +01:00
2026-07-17 06:57:54 +02:00
2026-04-27 18:33:22 +02:00
2026-07-26 07:18:23 +02:00
2026-07-08 08:59:54 +02:00
2026-03-10 18:12:53 +01:00
2026-05-12 00:22:37 +02:00
2026-04-18 00:06:24 +02:00
2026-06-11 16:19:58 +02:00
2026-05-03 10:56:31 +02:00
2026-06-25 05:44:44 +02:00
2026-05-05 01:20:57 +02:00
2026-06-11 16:19:58 +02:00
2026-07-22 00:41:58 +02:00
2026-07-14 01:39:26 +02:00
2026-06-28 16:12:33 +02:00
2026-07-25 04:59:29 +02:00
2026-01-07 20:17:23 +01:00
2026-03-14 20:32:13 +01:00
2026-05-28 14:55:21 +02:00
2026-07-25 04:47:58 +02:00
2026-05-18 19:10:01 +02:00
2026-07-08 09:00:49 +02:00
2026-07-26 07:40:25 +02:00
2026-07-14 01:39:26 +02:00
2026-07-08 08:51:22 +02:00
2026-05-14 21:56:49 +02:00
2026-07-26 07:44:06 +02:00
2026-04-18 09:50:34 +02:00
2026-07-24 22:45:44 +02:00
2026-05-09 21:55:20 +02:00
2026-05-09 12:36:41 +02:00
2026-01-23 12:35:49 +01:00
2026-07-17 06:57:54 +02:00
2026-06-01 21:46:32 +02:00
2026-03-29 10:08:54 +02:00
2026-07-25 04:54:30 +02:00
2026-03-14 23:56:27 +01:00
2026-06-16 10:51:51 +02:00
2026-02-16 13:50:06 +01:00
2026-06-28 19:47:53 +00:00
2026-04-13 19:53:04 +02:00
2026-05-05 20:07:40 +02:00
2025-12-24 00:59:50 +01:00
2026-07-21 01:28:53 +02:00