aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/base.rb
diff options
context:
space:
mode:
authorRasik Pandey <rbpandey@gmail.com>2009-01-28 19:39:06 +0000
committerPratik Naik <pratiknaik@gmail.com>2009-01-28 19:39:06 +0000
commit6079ec1f77daf364a2b25cf651e9b3c9e1b95a16 (patch)
tree229921115599ceaf9fe33e17228ee2541f18970a /activeresource/lib/active_resource/base.rb
parent9a8e2a059c823498e0fb318f25b926a6d015ef87 (diff)
downloadrails-6079ec1f77daf364a2b25cf651e9b3c9e1b95a16.tar.gz
rails-6079ec1f77daf364a2b25cf651e9b3c9e1b95a16.tar.bz2
rails-6079ec1f77daf364a2b25cf651e9b3c9e1b95a16.zip
ActiveResource#eqls? and == should not take into account object identity and prefix options should be considered. [#1098 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activeresource/lib/active_resource/base.rb')
-rw-r--r--activeresource/lib/active_resource/base.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index 4192fab525..54dde43087 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -746,8 +746,8 @@ module ActiveResource
# # => true
#
def ==(other)
- other.equal?(self) || (other.instance_of?(self.class) && !other.new? && other.id == id)
- end
+ other.equal?(self) || (other.instance_of?(self.class) && other.id == id && other.prefix_options == prefix_options)
+ end
# Tests for equality (delegates to ==).
def eql?(other)