method
query_attribute
v1.0.0 -
Show latest stable
- Class:
ActiveRecord::Base
query_attribute(attr_name)private
No documentation available.
# File activerecord/lib/active_record/base.rb, line 1599
def query_attribute(attr_name)
attribute = @attributes[attr_name]
if attribute.kind_of?(Fixnum) && attribute == 0
false
elsif attribute.kind_of?(String) && attribute == "0"
false
elsif attribute.kind_of?(String) && attribute.empty?
false
elsif attribute.nil?
false
elsif attribute == false
false
elsif attribute == "f"
false
elsif attribute == "false"
false
else
true
end
end