I have a boolean attribute (published) in my model book
and I wish to filter all books using checkboxes on that value.
class Book < ActiveRecord::Base
attr_accessible :published
end
That means I'd like something like eq_any
but for true
or false
. Is there a way to do this using Ransack?
UPDATE
I'd like users to be able to select only published books, only unpublished books and any book. So a single checkbox won't do.