mv lib to app/lib due to upgrade
This commit is contained in:
parent
3d81dd6b57
commit
4ff44aed4c
26 changed files with 75 additions and 78 deletions
29
app/lib/bank_transactions_csv.rb
Normal file
29
app/lib/bank_transactions_csv.rb
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue