X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/cdef2ed51aff8d9878fa23778689f4a2a2e492d6..0e9443678fc7fd4862b76a10184dc7357a75155d:/apps/workbench/app/helpers/application_helper.rb diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb index f2cbaddca4..f1502afee1 100644 --- a/apps/workbench/app/helpers/application_helper.rb +++ b/apps/workbench/app/helpers/application_helper.rb @@ -1,6 +1,4 @@ module ApplicationHelper - include VersionHelper - def current_user controller.current_user end @@ -309,17 +307,13 @@ module ApplicationHelper end end - if dataclass.andand.is_a?(Class) - datatype = 'select' - elsif dataclass == 'number' - datatype = 'number' - elsif attrvalue.is_a? Array - # TODO: find a way to edit arrays with x-editable - return attrvalue - elsif attrvalue.is_a? Fixnum or attrvalue.is_a? Float + if dataclass == 'number' or attrvalue.is_a? Fixnum or attrvalue.is_a? Float datatype = 'number' elsif attrvalue.is_a? String datatype = 'text' + elsif attrvalue.is_a?(Array) or dataclass.andand.is_a?(Class) + # TODO: find a way to edit with x-editable + return attrvalue end # When datatype is a String or Fixnum, link_to the attrvalue