Sha256: 0967583e9955306fbd2b4d43f7ebfc509154bda166bdbcebbcca30d2865e37c6
Contents?: true
Size: 845 Bytes
Versions: 10
Compression:
Stored size: 845 Bytes
Contents
module Shipit class TaskSerializer < ActiveModel::Serializer include ConditionalAttributes has_one :author has_one :revision, serializer: ShortCommitSerializer attributes :id, :url, :html_url, :output_url, :type, :status, :action, :description, :updated_at, :created_at def revision object.until_commit end def url api_stack_task_url(object.stack, object) end def html_url stack_task_url(object.stack, object) end def output_url api_stack_task_output_url(object.stack, object) end def type :task end def action object.definition.try!(:action) end def include_action? type == :task end def description object.definition.try!(:action) end def include_description? type == :task end end end
Version data entries
10 entries across 10 versions & 1 rubygems