API v1 financial_transactions endpoints (#627)

This commit is contained in:
wvengen 2020-07-25 14:18:59 +00:00 committed by GitHub
parent 8c8b42c2b2
commit b96ce06d94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 397 additions and 1 deletions

View file

@ -0,0 +1,13 @@
class FinancialTransactionSerializer < ActiveModel::Serializer
include ApplicationHelper
attributes :id, :user_id, :user_name, :amount, :note, :created_at
def user_name
show_user object.user
end
def amount
object.amount.to_f
end
end