I am using ElasticSearch with chewy GEM on a Rails application. I would some help in order to translate that:
all.select { |task|
(task.start_at.to_date..task.end_at.to_date).cover?(Date.today)
}
to use a filter with chewy. I tried making this work by long hours, no success.
Any kind of help will be great.
Thanks
This code iterates over the collection "all". For each item it checks and returns true if the today is within the execution time scope of the task(it today's date is between the begin_at and end_at range), i.e if the task should be executed.