1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-25 08:09:38 +02:00

Fix Merchants controller (#704)

* Add climate_control gem and test helper

* Replace ENV mods in upgrades test

* Replace ENV mods in registrations test

* Remove ENV references in hostings controller

* Update ENV refs in mailer test

* ActiveStorage cleanup

* Consolidate queue config so appropriate adapter runs in test environment

* Make test environment more explicit

* Centralize self hosting config

* Remove flaky system test

* Fix merchants controller actions
This commit is contained in:
Zach Gollwitzer 2024-05-02 13:24:23 -04:00 committed by GitHub
parent 5dfbba403a
commit 75cdddc6ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 12 deletions

View file

@ -10,22 +10,16 @@ class Transactions::MerchantsController < ApplicationController
end
def create
if Current.family.transaction_merchants.create(merchant_params)
redirect_to transaction_merchants_path, notice: t(".success")
else
render transaction_merchants_path, status: :unprocessable_entity, notice: t(".error")
end
Current.family.transaction_merchants.create!(merchant_params)
redirect_to transaction_merchants_path, notice: t(".success")
end
def edit
end
def update
if @merchant.update(merchant_params)
redirect_to transaction_merchants_path, notice: t(".success")
else
render transaction_merchants_path, status: :unprocessable_entity, notice: t(".error")
end
@merchant.update!(merchant_params)
redirect_to transaction_merchants_path, notice: t(".success")
end
def destroy