Sha256: 6a44288d0a6d8acee9b1769f246b0c6a7ed758766e75c66db70be20750d166b1
Contents?: true
Size: 791 Bytes
Versions: 13
Compression:
Stored size: 791 Bytes
Contents
require 'appmap/handler/function' module AppMap module Handler module Rails class RenderHandler < AppMap::Handler::Function def handle_call(receiver, args) options, _ = args # TODO: :file, :xml # https://guides.rubyonrails.org/v5.1/layouts_and_rendering.html if options[:json] Thread.current[TEMPLATE_RENDER_FORMAT] = :json end super end def handle_return(call_event_id, elapsed, return_value, exception) if Thread.current[TEMPLATE_RENDER_FORMAT] == :json Thread.current[TEMPLATE_RENDER_VALUE] = JSON.parse(return_value) rescue nil end Thread.current[TEMPLATE_RENDER_FORMAT] = nil super end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems