Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Date scopes for ActiveRecord
Ruby
tag: v0.0.3

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
Gemfile
Rakefile
date_scopable.gemspec
readme.md

readme.md

DateScopable

DateScopable provides convenient scopes for Rails ActiveRecord models:

User.today
User.yesterday
User.on Date.parse("4/7/2011")
User.last_7_days
User.last_month
User.in_month_year(12,1999)
User.between(Date.parse("4/1/2011"), Date.parse("4/5/2011"))

Usage

# Gemfile
gem "date_scopable"

$ bundle install

# In your models
class User < ActiveRecord::Base
    include DateScopable

    # the rest of your model
end
Something went wrong with that request. Please try again.