I have a Product model with an expired_at field. I want the query to return all products with an expired_at value that is greater than some value or equal to zero.
But I met problems here:
manufactured_at = Date.tomorrow Product.where('expired_at > ? OR expired_at = NULL', manufactured_at) # => ActiveRecord::Relation [] Product.all # => Product id: 1, expired_at: nil, Product id; 2, expired_at: nil, ...
How can I get these products in my request?
source share