aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource
diff options
context:
space:
mode:
authorElomar França <elomar@maisweb.org>2010-05-24 23:55:14 -0300
committerJosé Valim <jose.valim@gmail.com>2010-05-26 15:57:27 +0200
commit7bd30b9585ec709cb56d26a54182e438bae00a08 (patch)
treefb1e1f5a9715e274431c9d4241ccf9e98dc60bb7 /activeresource/lib/active_resource
parent163152bfd0ea5344472d24b6f89e8c957dbd66f5 (diff)
downloadrails-7bd30b9585ec709cb56d26a54182e438bae00a08.tar.gz
rails-7bd30b9585ec709cb56d26a54182e438bae00a08.tar.bz2
rails-7bd30b9585ec709cb56d26a54182e438bae00a08.zip
Adding to_key to ActiveResource objects using ActiveModel::Conversion [#4685 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activeresource/lib/active_resource')
-rw-r--r--activeresource/lib/active_resource/base.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index 6397fbc280..b89097ac4b 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -1044,11 +1044,6 @@ module ActiveResource
attributes[self.class.primary_key] = id
end
- # Allows Active Resource objects to be used as parameters in Action Pack URL generation.
- def to_param
- id && id.to_s
- end
-
# Test for equality. Resource are equal if and only if +other+ is the same object or
# is an instance of the same class, is not <tt>new?</tt>, and has the same +id+.
#
@@ -1411,6 +1406,7 @@ module ActiveResource
class Base
extend ActiveModel::Naming
include CustomMethods, Observing, Validations
+ include ActiveModel::Conversion
include ActiveModel::Serializers::JSON
include ActiveModel::Serializers::Xml
end