X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/536713e6a7c16e7a54eef1c310f15c708cb1f2be..4cfb296612f7b483b56c36f119ca175def706d2f:/apps/workbench/app/controllers/application_controller.rb diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb index b211f51bdc..8acaa60818 100644 --- a/apps/workbench/app/controllers/application_controller.rb +++ b/apps/workbench/app/controllers/application_controller.rb @@ -128,6 +128,8 @@ class ApplicationController < ActionController::Base end end end + # After this, params[:filters] can be trusted to be an array of arrays: + params[:filters] = filters @filters += filters end end @@ -202,7 +204,13 @@ class ApplicationController < ActionController::Base return render_not_found("object not found") end respond_to do |f| - f.json { render json: @object.attributes.merge(href: url_for(action: :show, id: @object)) } + f.json do + extra_attrs = { href: url_for(action: :show, id: @object) } + @object.textile_attributes.each do |textile_attr| + extra_attrs.merge!({ "#{textile_attr}Textile" => view_context.render_markup(@object.attributes[textile_attr]) }) + end + render json: @object.attributes.merge(extra_attrs) + end f.html { if params['tab_pane'] render_pane params['tab_pane'] @@ -731,7 +739,7 @@ class ApplicationController < ActionController::Base @my_project_tree = sorted_paths.call buildtree.call(children_of, 'me') @shared_project_tree = - sorted_paths.call({'Shared with me' => + sorted_paths.call({'Projects shared with me' => buildtree.call(children_of, false)}) end