Closed punund closed 14 years ago
What is the "right" way to search on boolean columns?
>> Invite.code_equals('F0LzDetW') => [#<Invite id: 29, created_at: "2009-11-14 20:53:51", updated_at: "2009-11-14 20:53:51", code: "F0LzDetW", table: nil, item: 11, accepted: nil, email: "bot@........lv">] >> Invite.code_equals('F0LzDetW').accepted_equals(false) => [] >> Invite.code_equals('F0LzDetW').accepted_equals(nil) => [] >> Invite.code_equals('F0LzDetW').accepted_does_not_equal(false) => [] >> Invite.code_equals('F0LzDetW').accepted_does_not_equal(nil) => [] >>
Whats the resulting SQL of the calls? That should work fine. But the correct way is to just use Invite.accepted, not argument
What is the "right" way to search on boolean columns?