v3: broadcasts - better renderer
This commit is contained in:
parent
0eb564388c
commit
06486c57a5
|
@ -2,11 +2,11 @@ require 'travis/api/v3/renderer/model_renderer'
|
|||
|
||||
module Travis::API::V3
|
||||
class Renderer::Broadcast < Renderer::ModelRenderer
|
||||
representation(:minimal, :id, :recipient_id, :message, :created_at, :category)
|
||||
representation(:standard, :id, :recipient_id, :recipient_type, :category, :kind, :message, :expired, :created_at, :updated_at)
|
||||
representation(:minimal, :id, :message, :created_at, :category, :active)
|
||||
representation(:standard, :id, *representations[:minimal], :recipient)
|
||||
|
||||
def expired
|
||||
model.expired?
|
||||
def active
|
||||
model.active?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user