mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-28 17:49: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:
parent
5dfbba403a
commit
75cdddc6ca
2 changed files with 4 additions and 12 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue