lib/massive/process_serializer.rb in massive-0.3.0 vs lib/massive/process_serializer.rb in massive-0.4.0
- old
+ new
@@ -1,12 +1,17 @@
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