aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-07-05 02:54:19 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-07-05 02:54:19 +0000
commit784165e03b8d297916edd23060a0f6b5c79b7ba1 (patch)
tree5b6766f5db1390bd2441f0f5d1cecfa897e47d35 /activerecord/lib/active_record/base.rb
parente8504877c0659f437cf294c6bca3471e025226d2 (diff)
downloadrails-784165e03b8d297916edd23060a0f6b5c79b7ba1.tar.gz
rails-784165e03b8d297916edd23060a0f6b5c79b7ba1.tar.bz2
rails-784165e03b8d297916edd23060a0f6b5c79b7ba1.zip
Fixed a few Oracle issues: Allows Oracle's odd date handling to still work consistently within #to_xml, Passes test that hardcode insert statement by dropping the :id column, Updated RUNNING_UNIT_TESTS with Oracle instructions, Corrects method signature for #exec #5294 [schoenm@earthlink.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4552 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 812f30c773..fba17bd917 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1646,8 +1646,9 @@ module ActiveRecord #:nodoc:
def ==(comparison_object)
comparison_object.equal?(self) ||
(comparison_object.instance_of?(self.class) &&
- comparison_object.id == id &&
- !comparison_object.new_record?)
+ ((!comparison_object.new_record? && comparison_object.id == id) ||
+ (comparison_object.new_record? && comparison_object.attributes == attributes))
+ )
end
# Delegates to ==