Permalink
Browse files

try to appease the angry Oracle

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5808 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 0bfabaa commit 6a5388b6549cb88fd19ff7ea2c48be1210a6e1cb @jamis jamis committed Dec 29, 2006
Showing with 2 additions and 2 deletions.
  1. +1 −1 activerecord/lib/active_record/base.rb
  2. +1 −1 activerecord/test/base_test.rb
@@ -1979,7 +1979,7 @@ def query_attribute(attr_name)
else
column = self.class.columns_hash[attr_name]
if column.nil?
- if value !~ /[^0-9]/
+ if Numeric === value || value !~ /[^0-9]/
!value.to_i.zero?
else
!value.blank?
@@ -314,7 +314,7 @@ def test_query_attribute_with_custom_fields
object.string_value = " "
assert !object.string_value?
- assert_equal "1", object.int_value
+ assert_equal 1, object.int_value.to_i
assert object.int_value?
object.int_value = "0"

0 comments on commit 6a5388b

Please sign in to comment.