contentful-management.rb icon indicating copy to clipboard operation
contentful-management.rb copied to clipboard

Question: Query using date comparison

Open fdocr opened this issue 1 year ago • 0 comments

Hi, I have a query that looks like this:

entries = environment.entries.all("content_type" => content_type.id, 'sys.createdBy.sys.id' => user_id)

How could I add a filter to that query for entries created in the last 24h? Similar to how in Rails I would query ActiveRecord like .where("created_at > ?", 1.day.ago), I'm just unsure how I could do that using the gem. Thanks!

fdocr avatar May 09 '24 15:05 fdocr