diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2016-10-04 10:02:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-04 10:02:34 +0100 |
commit | 0fc115724b87f7b4c990dc26d8b42f48ae72dfeb (patch) | |
tree | e48727040cc1c69fe3d72fec1fd031128420f644 /activerecord/lib/active_record/attribute_methods | |
parent | 16bb6122e221d33780ab49ea98bd4253f25fbb4f (diff) | |
parent | 671eb742eec77b5c8281ac2a2e3976ef32a6e424 (diff) | |
download | rails-0fc115724b87f7b4c990dc26d8b42f48ae72dfeb.tar.gz rails-0fc115724b87f7b4c990dc26d8b42f48ae72dfeb.tar.bz2 rails-0fc115724b87f7b4c990dc26d8b42f48ae72dfeb.zip |
Merge pull request #26693 from iainbeeston/consistently-use-activerecord-attributes
Made ActiveRecord consistently use ActiveRecord::Type (not ActiveModel::Type)
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods/query.rb | 2 |
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?) |