aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2010-04-25 21:02:35 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2010-04-25 21:04:19 -0700
commit2a6e0f34ad6b48dcf41989e0d7555cda46492b34 (patch)
treee66d0d1fc3d0a8470f7cf3f914707b68f1def4b2 /activeresource/lib/active_resource
parent490a3335d56c124c8113aac0b63ad367f81bb450 (diff)
downloadrails-2a6e0f34ad6b48dcf41989e0d7555cda46492b34.tar.gz
rails-2a6e0f34ad6b48dcf41989e0d7555cda46492b34.tar.bz2
rails-2a6e0f34ad6b48dcf41989e0d7555cda46492b34.zip
Revert "create option to include_root_in_json for ActiveResource [#2584 state:committed]"
This reverts commits 72f89b5d971b48a133c4c0af56fbeda35d738dae, 137d8e0b2fe9fcc4fdac6cbbd44ca010784e5972. Should reuse Active Model. [#2584 state:incomplete]
Diffstat (limited to 'activeresource/lib/active_resource')
-rw-r--r--activeresource/lib/active_resource/base.rb9
1 files changed, 0 insertions, 9 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index 1dd5af8098..bf775a14c8 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -251,9 +251,6 @@ module ActiveResource
# The logger for diagnosing and tracing Active Resource calls.
cattr_accessor :logger
- # Controls the top-level behavior of JSON serialization
- cattr_accessor :include_root_in_json, :instance_writer => false
-
class << self
# Creates a schema for this resource - setting the attributes that are
# known prior to fetching an instance from the remote system.
@@ -1243,12 +1240,6 @@ module ActiveResource
case self.class.format
when ActiveResource::Formats::XmlFormat
self.class.format.encode(attributes, {:root => self.class.element_name}.merge(options))
- when ActiveResource::Formats::JsonFormat
- if ActiveResource::Base.include_root_in_json
- self.class.format.encode({self.class.element_name => attributes}, options)
- else
- self.class.format.encode(attributes, options)
- end
else
self.class.format.encode(attributes, options)
end