From 6e3e00219b6910ec39b84844c845e0e237ff15a6 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 26 Apr 2009 20:25:36 -0700 Subject: Fix differing rails_to_json arity --- activeresource/lib/active_resource/base.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'activeresource/lib/active_resource') diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index 2e742267ba..f9a461d02e 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -890,9 +890,6 @@ module ActiveResource ActiveSupport::JSON.encode(attributes, options) end - # For compatibility with ActiveSupport::JSON.encode - alias rails_to_json to_json - # Returns the serialized string representation of the resource in the configured # serialization format specified in ActiveResource::Base.format. The options # applicable depend on the configured encoding format. @@ -1064,6 +1061,11 @@ module ActiveResource self.class.__send__(:split_options, options) end + # For compatibility with ActiveSupport::JSON.encode + def rails_to_json(options, *args) + to_json(options) + end + def method_missing(method_symbol, *arguments) #:nodoc: method_name = method_symbol.to_s -- cgit v1.2.3