Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

Latest commit

 

History

History
15 lines (11 loc) · 439 Bytes

README.md

File metadata and controls

15 lines (11 loc) · 439 Bytes

DateRangeScopes

Automatically add scopes for day, week, month and year ranges to Active Record models. See date_range_scopes.rb for a full example.

Usage

class User < ActiveRecord::Base
  include DateRangeScopes
end

# => User.created_on
# => User.created_in_week(5.weeks.ago)
# => User.created_in_year