foodsoft/app/lib/bank_transactions_csv.rb
viehlieb fb8ccfea4a rails up to 7.0and ruby to 2.7.2
mv lib to app/lib due to upgrade

removing concerns from autoload path

resolve zeitwerk issues

make foodsoft run for dev on rails 7 and ruby 2.7

fix mail file permission bug

fix database_config

fix articles controller test ActiveModell::Error

bump Gemfile.lock
2023-01-17 16:35:04 +01:00

29 lines
617 B
Ruby

require 'csv'
class BankTransactionsCsv < RenderCsv
include ApplicationHelper
def header
[
BankTransaction.human_attribute_name(:external_id),
BankTransaction.human_attribute_name(:date),
BankTransaction.human_attribute_name(:amount),
BankTransaction.human_attribute_name(:iban),
BankTransaction.human_attribute_name(:reference),
BankTransaction.human_attribute_name(:text)
]
end
def data
@object.each do |t|
yield [
t.external_id,
t.date,
t.amount,
t.iban,
t.reference,
t.text
]
end
end
end