-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
My second oddity of the day. There may be gremlins in my system...
On consecutive lines (in a rake task) I have the following code:
puts Sms.exists?(conditions:
{ message_id: "123" }) #=> false
puts Sms.where(message_id: "123").length #=> 2
Shouldn't happen, right? This is what exists? is supposed to be used for, right? And I can't see how some odd context-change could have messed this up. Literally on consecutive lines as you see it here. I can also see the Rails log spitting out identical queries for each. All do find count using the exact same conditions.
I am on gem version (2.2.4).