1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00
fab-manager/app/views/api/wallet/transactions.json.jbuilder
2016-07-21 16:32:55 +02:00

13 lines
373 B
Ruby

json.array!(@wallet_transactions) do |t|
json.extract! t, :id, :transaction_type, :created_at, :amount, :transactable_type
json.user do
json.id t.user.id
json.full_name t.user.profile.full_name
end
json.transactable do
if t.transactable_type == 'Reservation'
json.reservable_type t.transactable.reservable_type
end
end if t.transactable
end