This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Thu Feb 05 13:17:26 -0800 2009 | |
| |
README.rdoc | Thu Feb 05 13:17:26 -0800 2009 | |
| |
Rakefile | Thu Feb 05 13:17:26 -0800 2009 | |
| |
init.rb | Thu Feb 05 13:17:26 -0800 2009 | |
| |
lib/ | Thu May 21 00:37:27 -0700 2009 |
README.rdoc
FindAllByDateRange
find_all_by_date_range allows you to find ActiveRecord::Base models based on a date range. By default find_all_by_date_range uses the :created_at column of the model to search. This can be changed to something else by passing {:use => :column_name} as an option.
Install
gem install find_all_by_date_range --source http://gems.github.com
Usage
Find all records by :created_at column (Default)
Invoice.find_all_by_date_range(1.year.ago,Time.now)
Find all records by a custom column name
Invoice.find_all_by_date_range(1.year.ago,Time.now,{:use => :invoiced_on})
Find all records with limit option
Invoice.find_all_by_date_range(1.year.ago,Time.now,{:limit => 5})







