simon-engledew/count-by-month
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
CountByMonth ============ Adds a class method to ActiveRecord::Base that will count records by month. Example ======= Post.count_by_month => {Wed, 01 Oct 2008=>2, Mon, 01 Sep 2008=>1, Sun, 01 Jun 2008=>1} Post.count_by_month(:conditions => {:user_id => User.first}) => {Wed, 01 Oct 2008=>2, Mon, 01 Sep 2008=>1} @author.posts.count_by_month => {Wed, 01 Oct 2008=>2, Mon, 01 Sep 2008=>1} Copyright (c) 2008 Simon Engledew, released under the MIT license
About
Adds an ActiveRecord class method to count records by the month they were created.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published