mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-17 00:07:24 +00:00
Doc how balance_value works
[skip ci]
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
module Api
|
||||
module Admin
|
||||
# This serializer relies on `object` to respond to `#balance_value`. That's done in
|
||||
# `CustomersWithBalance` due to the fact that ActiveRecord maps the DB result set's columns to
|
||||
# instance methods. This way, the `balance_value` alias on that class ends up being
|
||||
# `object.balance_value` here.
|
||||
class CustomerWithBalanceSerializer < CustomerSerializer
|
||||
attributes :balance, :balance_status
|
||||
|
||||
|
||||
Reference in New Issue
Block a user