Search code examples
ruby-on-rails-3ransack

Ransack - column equal 0 or null


Suppose I have a model MyModel with an attribute star. Which predicates in ransack should I use to get the following query:

SELECT * FROM my_models WHERE star = 0 OR star IS NULL;

Thanks


Solution

  • I was doing some tests and using the predicate star_blank => 1 automatically does that.