aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-03-30 03:38:15 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-03-30 03:38:15 +0000
commit0703149e713c112f8568d396e7bc6e9be21c31d2 (patch)
tree89733b201886b7c546b3f4b6cb9b032269f4bab5 /activerecord
parent2cc9b21c074c99dad95cebfb0ae2ed787b482123 (diff)
downloadrails-0703149e713c112f8568d396e7bc6e9be21c31d2.tar.gz
rails-0703149e713c112f8568d396e7bc6e9be21c31d2.tar.bz2
rails-0703149e713c112f8568d396e7bc6e9be21c31d2.zip
Fixed broken OCIAdapter (closes #4457) [schoenm@earthlink.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4100 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG5
-rw-r--r--activerecord/lib/active_record/connection_adapters/oracle_adapter.rb12
2 files changed, 9 insertions, 8 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 81722474ff..fc75662ebc 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,3 +1,8 @@
+*SVN*
+
+* Fixed broken OCIAdapter #4457 [schoenm@earthlink.net]
+
+
*1.14.0* (March 27th, 2005)
* Replace 'rescue Object' with a finer grained rescue. Closes #4431. [Nicholas Seckar]
diff --git a/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb b/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb
index 92120920fe..421573d130 100644
--- a/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb
@@ -44,15 +44,11 @@ begin
# Enable the id column to be bound into the sql later, by the adapter's insert method.
# This is preferable to inserting the hard-coded value here, because the insert method
# needs to know the id value explicitly.
- def attributes_with_quotes_pre_oracle #:nodoc:
- attributes_with_quotes
- end
-
-
- def attributes_with_quotes(creating = true) #:nodoc:
- aq = attributes_with_quotes_pre_oracle creating
+ alias :attributes_with_quotes_pre_oracle :attributes_with_quotes
+ def attributes_with_quotes(include_primary_key = true) #:nodoc:
+ aq = attributes_with_quotes_pre_oracle(include_primary_key)
if connection.class == ConnectionAdapters::OracleAdapter
- aq[self.class.primary_key] = ":id" if creating && aq[self.class.primary_key].nil?
+ aq[self.class.primary_key] = ":id" if include_primary_key && aq[self.class.primary_key].nil?
end
aq
end