pro3958 and agentloop
fcb46be19f
fix(transactions): re-render form when creating a transaction with no account ( #2777 )
...
TransactionsController#create looked up the account with
accessible_accounts.find(params.dig(:entry, :account_id)). With no
account selected the id is blank, find raises RecordNotFound, and
StoreLocation's rescue_from turns that into head :not_found — the 404
on /transactions the reporter saw.
Switch to find_by(id:) and, when it returns nil, rebuild the entry,
run validation, and re-render :new with 422, matching the existing
validation-failure branch. This covers a blank, missing, or invalid
account_id, so the user gets the form back with errors instead of a
dead button.
Fixes #2566
Co-authored-by: agentloop <agentloop@localhost>
2026-08-22 06:31:18 +02:00
..
2026-06-06 09:14:50 +02:00
2026-08-18 08:36:46 +02:00
2026-05-13 18:13:48 +02:00
2026-08-04 23:03:12 +02:00
2026-08-20 01:52:00 +02:00
2026-08-22 04:33:54 +02:00
2026-08-04 23:10:39 +02:00
2026-08-18 08:36:46 +02:00
2026-07-30 07:15:50 +02:00
2026-04-29 18:35:00 +02:00
2026-03-25 10:50:23 +01:00
2026-05-13 21:05:11 +02:00
2026-06-02 18:47:09 +02:00
2026-08-22 06:08:03 +02:00
2026-06-02 21:44:57 +02:00
2026-05-19 14:41:02 +02:00
2026-05-27 23:58:00 +02:00
2026-05-13 18:13:48 +02:00
2026-08-18 08:36:46 +02:00
2026-08-18 08:36:46 +02:00
2026-08-22 04:42:40 +02:00
2026-05-17 09:52:49 +02:00
2026-03-25 17:47:04 +01:00
2026-04-01 20:25:06 +02:00
2026-07-21 09:15:24 +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-22 00:38:52 +02:00
2026-06-02 14:00:16 +02:00
2026-08-16 08:12:45 +02:00
2026-05-17 09:52:49 +02:00
2026-05-12 23:45:19 +02:00
2026-08-22 04:33:54 +02:00
2026-04-27 18:33:22 +02:00
2026-08-11 06:15:02 +02:00
2026-07-08 08:59:54 +02:00
2026-05-17 09:52:49 +02:00
2026-05-12 00:22:37 +02:00
2026-04-18 00:06:24 +02:00
2026-03-31 17:22:49 +02:00
2026-08-04 23:33:01 +02:00
2026-05-03 10:56:31 +02:00
2026-08-15 06:12:22 +02:00
2026-05-05 01:20:57 +02:00
2026-06-11 16:19:58 +02:00
2026-08-04 23:10:39 +02:00
2026-08-14 03:59:02 +02:00
2026-08-16 09:36:12 +02:00
2026-08-12 20:35:13 +02:00
2026-05-17 09:52:49 +02:00
2026-05-28 14:55:21 +02:00
2026-08-18 08:36:46 +02:00
2026-07-25 04:47:58 +02:00
2026-08-04 23:10:36 +00:00
2026-07-08 09:00:49 +02:00
2026-03-26 19:01:35 +01:00
2026-07-26 07:40:25 +02:00
2026-07-14 01:39:26 +02:00
2026-08-16 08:24:36 +02:00
2026-08-16 01:01:54 +02:00
2026-07-26 07:44:06 +02:00
2026-04-18 09:50:34 +02:00
2026-07-31 02:20:03 +02:00
2026-05-09 21:55:20 +02:00
2026-05-09 12:36:41 +02:00
2026-05-17 09:52:49 +02:00
2026-07-17 06:57:54 +02:00
2026-06-01 21:46:32 +02:00
2026-05-24 15:51:18 +02:00
2026-07-25 04:54:30 +02:00
2026-03-25 10:50:23 +01:00
2026-08-04 23:03:12 +02:00
2026-08-22 06:31:18 +02:00
2026-05-17 09:52:49 +02:00
2026-08-05 19:47:34 +02:00
2026-06-20 20:33:09 +02:00
2026-08-18 08:36:46 +02:00
2026-05-17 09:52:49 +02:00
2026-04-19 18:38:23 +02:00
2026-08-11 23:21:08 +02:00