projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into 3504-clients-compatible-with-3036
[arvados.git]
/
apps
/
workbench
/
app
/
models
/
arvados_base.rb
diff --git
a/apps/workbench/app/models/arvados_base.rb
b/apps/workbench/app/models/arvados_base.rb
index 3b5ac86f91c0c0f0134045a8e75a19bbc76c536d..c0e670dcefe65b6e0aa4d053b7c07cbf432813bb 100644
(file)
--- a/
apps/workbench/app/models/arvados_base.rb
+++ b/
apps/workbench/app/models/arvados_base.rb
@@
-56,7
+56,7
@@
class ArvadosBase < ActiveRecord::Base
end
def self.columns
end
def self.columns
- return @columns
unless @columns.nil
?
+ return @columns
if @columns.andand.any
?
@columns = []
@attribute_info ||= {}
schema = arvados_api_client.discovery[:schemas][self.to_s.to_sym]
@columns = []
@attribute_info ||= {}
schema = arvados_api_client.discovery[:schemas][self.to_s.to_sym]
@@
-131,6
+131,10
@@
class ArvadosBase < ActiveRecord::Base
ArvadosResourceList.new(self).limit(*args)
end
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 self.eager(*args)
ArvadosResourceList.new(self).eager(*args)
end
@@
-316,7
+320,7
@@
class ArvadosBase < ActiveRecord::Base
end
def attribute_editable?(attr, ever=nil)
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
false
elsif not (current_user.andand.is_active)
false