Last Updated: February 25, 2016
·
651
· jakeonrails

Easily add named timestamp scopes

http://github.com/jakeonrails/timestamp_scopes

# Allows you to do this:
class Post < ActiveRecord::Base
  add_timestamp_scopes

...
recent_posts = Post.created(after: 1.hour.ago)

old_posts = Post.created(before: 1.week.ago)