How to fix Ruby on Rails obj != nil error -
i'm trying ensure object not nil in ruby on rails , i'm getting error:
called id nil, mistakenly 4 -- if wanted id of nil, use object_id
this object looks in debugger (it not nil):
how correctly check nil in case? cases?
i've found similar posts not specific case: check nil gives error, , called id nil, mistakenly 4 -- if wanted id of nil, use object_id.
the !=
comparator using id
check equality. checking if ob1.id != ob2.id
, or in case map_set.id != nil.id
to check if object nil, can check if object has value. if object
or if !object.nil?
Comments
Post a Comment