X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8cd7249b96576285388ef036d04532f72a8f1ee3..fefce5e8e133a8fa064bbcdf31d85d41dc4a6729:/services/api/app/models/arvados_model.rb diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb index e5665e8670..5fc2d7873b 100644 --- a/services/api/app/models/arvados_model.rb +++ b/services/api/app/models/arvados_model.rb @@ -56,6 +56,12 @@ class ArvadosModel < ActiveRecord::Base "#{current_api_base}/#{self.class.to_s.pluralize.underscore}/#{self.uuid}" end + def self.selectable_attributes(template=:user) + # Return an array of attribute name strings that can be selected + # in the given template. + api_accessible_attributes(template).map { |attr_spec| attr_spec.first.to_s } + end + def self.searchable_columns operator textonly_operator = !operator.match(/[<=>]/) self.columns.select do |col|