2018-04-24 13:29:15 -04:00
|
|
|
class PenaltyCountsSerializer < ApplicationSerializer
|
2018-05-25 11:33:01 -04:00
|
|
|
attributes :silenced, :suspended, :total
|
|
|
|
|
|
|
|
def total
|
|
|
|
object.silenced + object.suspended
|
|
|
|
end
|
2018-04-24 13:29:15 -04:00
|
|
|
|
|
|
|
def silenced
|
|
|
|
object.silenced
|
|
|
|
end
|
|
|
|
|
|
|
|
def suspended
|
|
|
|
object.suspended
|
|
|
|
end
|
|
|
|
end
|