lib/quilt_rails/performance/reportable.rb in quilt_rails-1.12.1 vs lib/quilt_rails/performance/reportable.rb in quilt_rails-1.12.2
- old
+ new
@@ -2,11 +2,18 @@
module Quilt
module Performance
module Reportable
def process_report(&block)
- params.transform_keys! { |key| key.underscore.to_sym }
- Client.send!(Report.from_params(params), &block)
+ Client.send!(Report.from_params(normalized_params), &block)
+ end
+
+ private
+
+ def normalized_params
+ return params unless request.content_type == 'text/plain'
+
+ ActionController::Parameters.new(JSON.parse(request.body.read))
end
end
end
end