Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

fix(trades): prevent MissingTemplate for Turbo Stream requests on update/create failure (#1893)

sentry[bot]06518b49a122
diff --git a/app/controllers/trades_controller.rb b/app/controllers/trades_controller.rb
index e3a90121e4..e3aed40dbb 100644
--- a/app/controllers/trades_controller.rb
+++ b/app/controllers/trades_controller.rb
@@ -35,7 +35,7 @@ class TradesController < ApplicationController
format.turbo_stream { stream_redirect_back_or_to account_path(@account) }
end
else
- render :new, status: :unprocessable_entity
+ render :new, status: :unprocessable_entity, formats: [ :html ]
end
end
@@ -69,7 +69,7 @@ class TradesController < ApplicationController
end
end
else
- render :show, status: :unprocessable_entity
+ render :show, status: :unprocessable_entity, formats: [ :html ]
end
end