From 91386c1b355947955b05ee3846e4aedd4eec0eb1 Mon Sep 17 00:00:00 2001 From: namusyaka Date: Tue, 16 Feb 2016 11:35:52 +0900 Subject: Fix behavior of JSON encoding for Exception --- activesupport/lib/active_support/core_ext/object/json.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/core_ext/object/json.rb b/activesupport/lib/active_support/core_ext/object/json.rb index 0db787010c..d49b2fbe54 100644 --- a/activesupport/lib/active_support/core_ext/object/json.rb +++ b/activesupport/lib/active_support/core_ext/object/json.rb @@ -197,3 +197,9 @@ class Process::Status #:nodoc: { :exitstatus => exitstatus, :pid => pid } end end + +class Exception + def as_json(options = nil) + to_s + end +end -- cgit v1.2.3