From ab5750bc081eba31558deecd6234ef35ab5f8e7a Mon Sep 17 00:00:00 2001 From: Caio Chassot Date: Thu, 21 May 2009 14:35:58 -0300 Subject: [PATCH] activesupport/json/encoders fix that to_json should call rails_to_json, not just be an alias to the rails_to_json method defined in Object. fixes #2690 --- .../lib/active_support/json/encoders/object.rb | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/activesupport/lib/active_support/json/encoders/object.rb b/activesupport/lib/active_support/json/encoders/object.rb index 79d556d..c33039b 100644 --- a/activesupport/lib/active_support/json/encoders/object.rb +++ b/activesupport/lib/active_support/json/encoders/object.rb @@ -4,5 +4,7 @@ class Object ActiveSupport::JSON.encode(instance_values, options) end - alias to_json rails_to_json + def to_json + rails_to_json + end end -- 1.6.3.1