ArvadosResourceList.new(self).limit(*args)
end
+ def self.select(*args)
+ ArvadosResourceList.new(self).select(*args)
+ end
+
def self.eager(*args)
ArvadosResourceList.new(self).eager(*args)
end
def save
obdata = {}
self.class.columns.each do |col|
- obdata[col.name.to_sym] = self.send(col.name.to_sym)
+ unless self.send(col.name.to_sym).nil? and !self.changed.include?(col.name)
+ obdata[col.name.to_sym] = self.send(col.name.to_sym)
+ end
end
obdata.delete :id
postdata = { self.class.to_s.underscore => obdata }
self.to_s.underscore.humanize
end
+ # Array of strings that are names of attributes that should be rendered as textile.
+ def textile_attributes
+ []
+ end
+
def self.creatable?
current_user
end
end
def attribute_editable?(attr, ever=nil)
- if "created_at modified_at modified_by_user_uuid modified_by_client_uuid updated_at".index(attr.to_s)
+ if %w(created_at modified_at modified_by_user_uuid modified_by_client_uuid updated_at).include? attr.to_s
false
elsif not (current_user.andand.is_active)
false