diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-13 04:46:59 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-13 04:46:59 +0000 |
commit | 5fe0ecce0afd86a3ad244ca829deee92950476b2 (patch) | |
tree | 5d02cc0641bb030a684467dd4f72bcd38d29d8f4 /activerecord/lib | |
parent | d5cadfc1108728635055d476eff7b34c975705d6 (diff) | |
download | rails-5fe0ecce0afd86a3ad244ca829deee92950476b2.tar.gz rails-5fe0ecce0afd86a3ad244ca829deee92950476b2.tar.bz2 rails-5fe0ecce0afd86a3ad244ca829deee92950476b2.zip |
Fixed boolean saving on Oracle #1093 [mparrish@pearware.org]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1150 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/oci_adapter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/oci_adapter.rb b/activerecord/lib/active_record/connection_adapters/oci_adapter.rb index 06e2273b28..ef2e288be5 100644 --- a/activerecord/lib/active_record/connection_adapters/oci_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/oci_adapter.rb @@ -45,7 +45,7 @@ begin return nil if value.nil? || value =~ /^\s*null\s*$/i case type when :string then value - when :integer then value.to_i + when :integer then defined?(value.to_i) ? value.to_i : (value ? 1 : 0) when :float then value.to_f when :datetime then cast_to_date_or_time(value) when :time then cast_to_time(value) @@ -261,4 +261,4 @@ begin end rescue LoadError # OCI8 driver is unavailable. -end
\ No newline at end of file +end |