foodsoft/app/controllers/admin/finances_controller.rb
Philipp Rothmann fb2b4d8a8a chore: rubocop
chore: fix api test conventions

chore: rubocop -A spec/

chore: more rubocop -A

fix failing test

rubocop fixes

removes helper methods that are in my opinion dead code

more rubocop fixes

rubocop -a --auto-gen-config
2023-06-09 17:35:05 +02:00

30 lines
889 B
Ruby

class Admin::FinancesController < Admin::BaseController
inherit_resources
def index
@bank_accounts = BankAccount.order('name')
@bank_gateways = BankGateway.order('name')
@financial_transaction_classes = FinancialTransactionClass.includes(:financial_transaction_types).order('name ASC')
@supplier_categories = SupplierCategory.order('name')
end
def update_bank_accounts
@bank_accounts = BankAccount.order('name')
render layout: false
end
def update_bank_gateways
@bank_gateways = BankGateway.order('name')
render layout: false
end
def update_transaction_types
@financial_transaction_classes = FinancialTransactionClass.includes(:financial_transaction_types).order('name ASC')
render layout: false
end
def update_supplier_categories
@supplier_categories = SupplierCategory.order('name')
render layout: false
end
end