ruby on rails - Displaying specific records that match a specific criteria. -


i have number of records i'm looping through, , i'm trying flag out specific records not match logic within conditional. whatever i've been trying, results have been of records.

user.all.map |u|   if [u.zip_code == true]     u.name   end end 

i feel elementary asking this, i'm trying flag users not have zip_code. i've done, every record displayed regardless of if have conditional equaling true or false.

does know i'm doing wrong this?

thanks in advance.

try

user.all.map |u|   if u.zip_code     u.name   end end 

but if zip_code not true?


Comments