From 798881ecd4510b9e1e5e10529fc2d81b9deb961e Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Tue, 5 Nov 2013 21:01:38 -0800 Subject: Do not expose internal state in the public encoder API (i.e. as_json) See [1] for why this is not a good idea. As part of this refactor, circular reference protection in as_json has been removed and the corresponding error class has been deprecated. As discussed with @jeremy, circular reference error is considered programmer errors and protecting against it is out of scope for the encoder. This is again based on the excellent work by @sergiocampama in #11728. [1]: https://github.com/intridea/multi_json/pull/138#issuecomment-24468223 --- activesupport/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activesupport/CHANGELOG.md') diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 9e63a2bb17..3bb711c1ab 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,8 @@ +* Removed circular reference protection in JSON encoder, deprecated + ActiveSupport::JSON::Encoding::CircularReferenceError. + + *Godfrey Chan*, *Sergio Campamá* + * Add `capitalize` option to Inflector.humanize, so strings can be humanized without being capitalized: 'employee_salary'.humanize # => "Employee salary" -- cgit v1.2.3