My favorite thing I've learned recently is something I learned when needing to remove a bunch of records that had just been created in a Rails app.
If you want to get all the records of model
Post created on the current day, you can do:
An alternative is
Time.current.all_day version is so simple!
Thanks to this StackOverflow post for the solution!