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
上级 d5cadfc1
*SVN*
* Fixed boolean saving on Oracle #1093 [mparrish@pearware.org]
* Moved build_association and create_association for has_one and belongs_to out of deprecation as they work when the association is nil unlike association.build and association.create, which require the association to be already in place #864
* Added rollbacks of transactions if they're active as the dispatcher is killed gracefully (TERM signal) #1054 [Leon Bredt]
......
......@@ -45,7 +45,7 @@ def type_cast(value)
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 @@ def define_a_column(i)
end
rescue LoadError
# OCI8 driver is unavailable.
end
\ No newline at end of file
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册