Sha256: 56a2b18d4f9002d309f648d766e75b4769052f9b12341f2dd47b75bfb59e83e6

Contents?: true

Size: 331 Bytes

Versions: 1

Compression:

Stored size: 331 Bytes

Contents

module Massive
  class ProcessSerializer < ActiveModel::Serializer
    attributes :id, :created_at, :updated_at, :processed_percentage
    attribute :completed?, key: :completed

    has_one :file
    has_many :steps

    def id
      object.id.to_s
    end

    def include_file?
      object.respond_to?(:file)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
massive-0.4.0 lib/massive/process_serializer.rb