Pack up functionality done

This commit is contained in:
Senad Uka
2020-10-21 15:11:20 +02:00
parent 25cfc6610c
commit 6f655dfe2b
11 changed files with 95 additions and 13 deletions

View File

@@ -1,3 +1,14 @@
class Work < ApplicationRecord
belongs_to :homie
end
def to_csv_row
[homie.name,
0,
amount,
description,
created_at.strftime("%Y-%m-%d"),
false].map do |element|
element.to_s
end
end
end