mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove dead serializer
This became unused in
b9d72ce4cf (diff-5df9d1d16b9e9ac1724af5c6180ca86f7caeb6a4880d2f77ac25fbe757b597b9).
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
module Api
|
||||
class OrdersByDistributorSerializer < ActiveModel::Serializer
|
||||
attributes :name, :id, :hash, :balance, :logo, :distributed_orders
|
||||
has_many :distributed_orders, serializer: Api::OrderSerializer
|
||||
|
||||
def balance
|
||||
object.distributed_orders.map(&:outstanding_balance).reduce(:+)
|
||||
end
|
||||
|
||||
def hash
|
||||
object.to_param
|
||||
end
|
||||
|
||||
def logo
|
||||
object.logo(:small) if object.logo?
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user