mirror of
https://github.com/we-promise/sure.git
synced 2026-06-01 16:59:03 +00:00
Isolate infinite loop bug, add timeout to actions (#583)
* Isolate infinite loop bug, add timeout to actions * Increase timeout to allow for temporary failure * Set correct timeout, implement temporary fix * Trigger syncs at controller layer
This commit is contained in:
@@ -63,6 +63,7 @@ class TransactionsController < ApplicationController
|
||||
|
||||
respond_to do |format|
|
||||
if @transaction.save
|
||||
@transaction.account.sync_later
|
||||
format.html { redirect_to transactions_url, notice: t(".success") }
|
||||
else
|
||||
format.html { render :new, status: :unprocessable_entity }
|
||||
@@ -73,6 +74,8 @@ class TransactionsController < ApplicationController
|
||||
def update
|
||||
respond_to do |format|
|
||||
if @transaction.update(transaction_params)
|
||||
@transaction.account.sync_later
|
||||
|
||||
format.html { redirect_to transaction_url(@transaction), notice: t(".success") }
|
||||
format.turbo_stream do
|
||||
render turbo_stream: [
|
||||
@@ -88,6 +91,7 @@ class TransactionsController < ApplicationController
|
||||
|
||||
def destroy
|
||||
@transaction.destroy!
|
||||
@transaction.account.sync_later
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to transactions_url, notice: t(".success") }
|
||||
|
||||
Reference in New Issue
Block a user