aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods
diff options
context:
space:
mode:
authorIain Beeston <iain.beeston@gmail.com>2016-10-03 11:00:03 +0100
committerIain Beeston <iain.beeston@gmail.com>2016-10-03 16:42:26 +0100
commit671eb742eec77b5c8281ac2a2e3976ef32a6e424 (patch)
treed14e1802e7c5d86a5a560b878eb1a9b748787df0 /activerecord/lib/active_record/attribute_methods
parent2d6c14bca25c5629e431a802c3053bad1e378fcc (diff)
downloadrails-671eb742eec77b5c8281ac2a2e3976ef32a6e424.tar.gz
rails-671eb742eec77b5c8281ac2a2e3976ef32a6e424.tar.bz2
rails-671eb742eec77b5c8281ac2a2e3976ef32a6e424.zip
Made ActiveRecord consistently use ActiveRecord::Type (not
ActiveModel::Type) Some code was previously referring to ActiveModel::Type::*. This could cause issues in the future if any of the ActiveRecord::Type classes were overridden in the future.
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods')
-rw-r--r--activerecord/lib/active_record/attribute_methods/query.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/query.rb b/activerecord/lib/active_record/attribute_methods/query.rb
index 10498f4322..05f0e974b6 100644
--- a/activerecord/lib/active_record/attribute_methods/query.rb
+++ b/activerecord/lib/active_record/attribute_methods/query.rb
@@ -19,7 +19,7 @@ module ActiveRecord
if Numeric === value || value !~ /[^0-9]/
!value.to_i.zero?
else
- return false if ActiveModel::Type::Boolean::FALSE_VALUES.include?(value)
+ return false if ActiveRecord::Type::Boolean::FALSE_VALUES.include?(value)
!value.blank?
end
elsif value.respond_to?(:zero?)