RubyFlow The Ruby and Rails community linklog

Use your MongoDB document _id as your created_at timestamp for date range queries

In case you didn’t know, you can use your MongoDB document _id field for date range queries instead of having to use a separate created_at field and create a separate index for it. Here’s how simple it is to do it.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in