1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-28 09:39:39 +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 end
def create def create
if Current.family.transaction_merchants.create(merchant_params) Current.family.transaction_merchants.create!(merchant_params)
redirect_to transaction_merchants_path, notice: t(".success") redirect_to transaction_merchants_path, notice: t(".success")
else
render transaction_merchants_path, status: :unprocessable_entity, notice: t(".error")
end
end end
def edit def edit
end end
def update def update
if @merchant.update(merchant_params) @merchant.update!(merchant_params)
redirect_to transaction_merchants_path, notice: t(".success") redirect_to transaction_merchants_path, notice: t(".success")
else
render transaction_merchants_path, status: :unprocessable_entity, notice: t(".error")
end
end end
def destroy def destroy

View file

@ -59,7 +59,6 @@ en:
edit_categories: Edit categories edit_categories: Edit categories
merchants: merchants:
create: create:
error: Error creating merchant
success: New merchant created successfully success: New merchant created successfully
destroy: destroy:
success: Merchant deleted successfully success: Merchant deleted successfully
@ -84,7 +83,6 @@ en:
new: new:
title: New merchant title: New merchant
update: update:
error: Error updating merchant
success: Merchant updated successfully success: Merchant updated successfully
update: update:
success: Transaction updated successfully success: Transaction updated successfully