Open qoyyim opened 10 years ago
umm i already found the "right" way to using it in squeel (using == nil) but i already accustomed using .nil? and .present?
nb: btw i seen Your post in the blog if You busy, don't have time to fix this can You just give me pointer how to patch it myself
Not very easy, and I am not sure how necessary to add this feature. Maybe you could hack Squeel::Nodes::Stub
in your application?
Hi @qoyyim,
It is such a coincidence, we also encountered the same error on our Rails app. It happens after we cleaned up the code due to http://www.rubydoc.info/github/bbatsov/rubocop/Rubocop/Cop/Style/NilComparison which make this error appears (well, again).
We have reverted back the change. But out of curiosity, did you manage to find out why this happen? 😄
i have this query where{((valid_from >= my{date}) | (valid_from.nil?)) & ((valid_to <= my{date}) | (valid_to.nil?))}
and when i run it it's got that error