add pipelineInvocation resource. refs #1357
[arvados.git] / app / models / pipeline_invocation.rb
1 class PipelineInvocation < ActiveRecord::Base
2   include AssignUuid
3   serialize :components, Hash
4   belongs_to :pipeline, :foreign_key => :pipeline_uuid, :primary_key => :uuid
5
6   after_validation :bootstrap_components
7
8   protected
9   def bootstrap_components
10     if pipeline and (!components or components.empty?)
11       self.components = pipeline.components
12     end
13   end
14 end