aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 26010d8643..a4c317ff3f 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1979,7 +1979,7 @@ module ActiveRecord #:nodoc:
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?