aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-09-30 14:20:41 +0200
committerJosé Valim <jose.valim@gmail.com>2011-09-30 14:20:41 +0200
commitd4457dc32b4d5dc9fde6c852f55a0d43ee021282 (patch)
tree143dbc2eb36c94fc5d4ac7d1f20857db1821a955 /activeresource
parent37b9594a8e08916e1e9ae9a6aaffc13ef516ad11 (diff)
downloadrails-d4457dc32b4d5dc9fde6c852f55a0d43ee021282.tar.gz
rails-d4457dc32b4d5dc9fde6c852f55a0d43ee021282.tar.bz2
rails-d4457dc32b4d5dc9fde6c852f55a0d43ee021282.zip
Provide read_attribute_for_serialization as the API to serialize attributes.
Diffstat (limited to 'activeresource')
-rw-r--r--activeresource/lib/active_resource/base.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index 1ffd83b91d..03c4cc5b9e 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -1384,6 +1384,10 @@ module ActiveResource
private
+ def read_attribute_for_serialization(n)
+ attributes[n]
+ end
+
# Determine whether the response is allowed to have a body per HTTP 1.1 spec section 4.4.1
def response_code_allows_body?(c)
!((100..199).include?(c) || [204,304].include?(c))