From: Phil Hodgson Date: Wed, 20 Aug 2014 13:04:54 +0000 (-0400) Subject: Merge branch 'master' into 3354-render-textile X-Git-Tag: 1.1.0~2259^2~4 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/a3222e35cda68c8e48a17921c33ac37ecb5c3bac Merge branch 'master' into 3354-render-textile Conflicts (resolved): apps/workbench/app/controllers/application_controller.rb --- a3222e35cda68c8e48a17921c33ac37ecb5c3bac diff --cc apps/workbench/app/controllers/application_controller.rb index a673421ca1,5c99c15abc..d2f4ed44b2 --- a/apps/workbench/app/controllers/application_controller.rb +++ b/apps/workbench/app/controllers/application_controller.rb @@@ -174,18 -202,10 +202,16 @@@ class ApplicationController < ActionCon 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(@object) } ++ 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_content_from_database(@object.attributes[textile_attr]) }) + end + render json: @object.attributes.merge(extra_attrs) + end f.html { if params['tab_pane'] - comparable = self.respond_to? :compare - render(partial: 'show_' + params['tab_pane'].downcase, - locals: { comparable: comparable, objects: @objects }) + render_pane params['tab_pane'] elsif request.method.in? ['GET', 'HEAD'] render else