mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
pg supports real booleans, so handle the case when true
is returned
This commit is contained in:
parent
1e5cdbddfc
commit
321b4c8527
1 changed files with 5 additions and 2 deletions
|
@ -10,8 +10,11 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
def query_attribute(attr_name)
|
||||
unless value = read_attribute(attr_name)
|
||||
false
|
||||
value = read_attribute(attr_name)
|
||||
|
||||
case value
|
||||
when true then true
|
||||
when false, nil then false
|
||||
else
|
||||
column = self.class.columns_hash[attr_name]
|
||||
if column.nil?
|
||||
|
|
Loading…
Reference in a new issue