Closed y-yagi closed 2 months ago
Currently, the behavior when passing nil to exists? doesn't match with Rails's behavior. Rails always returns false, but ActiveHash not. https://github.com/rails/rails/blob/5a0b2fa5a3be6ffd49fa7f1c3544c1da403c9cb5/activerecord/lib/active_record/relation/finder_methods.rb#L367
nil
exists?
false
This PR changes the behavior to match with Rails's.
thank you @y-yagi
Currently, the behavior when passing
nil
toexists?
doesn't match with Rails's behavior. Rails always returnsfalse
, but ActiveHash not. https://github.com/rails/rails/blob/5a0b2fa5a3be6ffd49fa7f1c3544c1da403c9cb5/activerecord/lib/active_record/relation/finder_methods.rb#L367This PR changes the behavior to match with Rails's.