diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-11-27 11:31:17 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2010-11-27 11:31:17 +0000 |
commit | 3a7f43ca6ecf1735e1a82d4a68ac8f62b5cf2fcf (patch) | |
tree | 4960911c58f2c47ecaf4f4579167270ba9c257a7 /activeresource/lib/active_resource | |
parent | 1bc90044b655572a4b8aa3b323905e26d37e0f2b (diff) | |
parent | fd83f9d51583c080072dc9fd00f02ad742e265d4 (diff) | |
download | rails-3a7f43ca6ecf1735e1a82d4a68ac8f62b5cf2fcf.tar.gz rails-3a7f43ca6ecf1735e1a82d4a68ac8f62b5cf2fcf.tar.bz2 rails-3a7f43ca6ecf1735e1a82d4a68ac8f62b5cf2fcf.zip |
Merge branch 'master' into nested_has_many_through
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/associations.rb
Diffstat (limited to 'activeresource/lib/active_resource')
-rw-r--r-- | activeresource/lib/active_resource/base.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index b5b46d7431..d959fd103a 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -1,6 +1,6 @@ require 'active_support' require 'active_support/core_ext/class/attribute_accessors' -require 'active_support/core_ext/class/inheritable_attributes' +require 'active_support/core_ext/class/attribute' require 'active_support/core_ext/hash/indifferent_access' require 'active_support/core_ext/kernel/reporting' require 'active_support/core_ext/module/attr_accessor_with_default' @@ -263,6 +263,8 @@ module ActiveResource # The logger for diagnosing and tracing Active Resource calls. cattr_accessor :logger + class_attribute :_format + class << self # Creates a schema for this resource - setting the attributes that are # known prior to fetching an instance from the remote system. @@ -492,13 +494,13 @@ module ActiveResource format = mime_type_reference_or_format.is_a?(Symbol) ? ActiveResource::Formats[mime_type_reference_or_format] : mime_type_reference_or_format - write_inheritable_attribute(:format, format) + self._format = format connection.format = format if site end # Returns the current format, default is ActiveResource::Formats::XmlFormat. def format - read_inheritable_attribute(:format) || ActiveResource::Formats::XmlFormat + self._format || ActiveResource::Formats::XmlFormat end # Sets the number of seconds after which requests to the REST API should time out. |