Often times, doing a query involves time based methods: “All users updated within the last 6 months”, “All posts older than 1 year”, etc.
My proposal is for an ActiveRecord helper method that would allow those queries to be written in a way similar to:
Obviously that syntax may have to change to work with ActiveRecord/Arel.
I have been a Rails developer for about 3 years, so I’m very comfortable with Rails and ActiveRecord, though I have never contributed before. I am open to any and all suggestions or comments. I looked and didn’t see any similar proposals in Github issues, though I may have missed something. If there is positive feedback on this, I would love to take a stab at it and let that be my first contribution back to Rails and, with that, if you have any advice on actual implementation considerations, I would love to hear those ideas, too!