diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2010-11-19 18:29:33 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-20 19:40:29 +0100 |
commit | d7db6a88734c3b666f4b85f266d223eff408b294 (patch) | |
tree | ccfa0ed1a0e92b9c3324bf92f92391f2d20be95c /activeresource | |
parent | 8d8062190ddd0452088f6ea917267ed993a70990 (diff) | |
download | rails-d7db6a88734c3b666f4b85f266d223eff408b294.tar.gz rails-d7db6a88734c3b666f4b85f266d223eff408b294.tar.bz2 rails-d7db6a88734c3b666f4b85f266d223eff408b294.zip |
class inheritable attributes is used no more! all internal use of class inheritable has been changed to class_attribute. class inheritable attributes has been deprecated.
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activeresource')
-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. |