Merge branch 'master' into 3618-column-ordering
[arvados.git] / apps / workbench / app / models / pipeline_instance.rb
index 936905713e44891f22261bf6e1c0ba19e598ae75..83328b9e52ce31dd126812ba874de766282fb93c 100644 (file)
@@ -47,10 +47,12 @@ class PipelineInstance < ArvadosBase
     end
   end
 
-  def attribute_editable? attr, *args
-    super && (attr.to_sym == :name || attr.to_sym == :description ||
-              (attr.to_sym == :components and
-               (self.state == 'New' || self.state == 'Ready')))
+  def editable_attributes
+    %w(name description components)
+  end
+
+  def attribute_editable?(name, ever=nil)
+    (ever or %w(New Ready).include?(state)) and super
   end
 
   def attributes_for_display