Commit d9d3e0cacafc0fe9c97e9e037058842fe90942c7

Authored by Andrew Kane
1 parent f48842bb

Updated readme

Showing 1 changed file with 31 additions and 31 deletions   Show diff stats
README.md
... ... @@ -89,7 +89,37 @@ Go nuts!
89 89 Request.where(page: "/home").group_by_minute(:started_at).maximum(:request_time)
90 90 ```
91 91  
92   -### Note
  92 +## Installation
  93 +
  94 +Add this line to your application's Gemfile:
  95 +
  96 +```ruby
  97 +gem 'groupdate'
  98 +```
  99 +
  100 +### MySQL only
  101 +
  102 +[Time zone support](http://dev.mysql.com/doc/refman/5.6/en/time-zone-support.html) must be installed on the server.
  103 +
  104 +```
  105 +mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
  106 +```
  107 +
  108 +## Complete list
  109 +
  110 +group_by_?
  111 +
  112 +- second
  113 +- minute
  114 +- hour
  115 +- day
  116 +- week
  117 +- month
  118 +- year
  119 +- hour_of_day
  120 +- day_of_week
  121 +
  122 +## Note
93 123  
94 124 activerecord <= 4.0.0.beta1 and the pg gem returns String objects instead of Time objects.
95 125 [This is fixed on activerecord master](https://github.com/rails/rails/commit/2cc09441c2de57b024b11ba666ba1e72c2b20cfe)
... ... @@ -122,36 +152,6 @@ User.group_by_day_of_week(:created_at).count
122 152  
123 153 These are *not* a result of groupdate (and unfortunately cannot be fixed by groupdate)
124 154  
125   -## Installation
126   -
127   -Add this line to your application's Gemfile:
128   -
129   -```ruby
130   -gem 'groupdate'
131   -```
132   -
133   -### MySQL only
134   -
135   -[Time zone support](http://dev.mysql.com/doc/refman/5.6/en/time-zone-support.html) must be installed on the server.
136   -
137   -```
138   -mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
139   -```
140   -
141   -## Complete list
142   -
143   -group_by_?
144   -
145   -- second
146   -- minute
147   -- hour
148   -- day
149   -- week
150   -- month
151   -- year
152   -- hour_of_day
153   -- day_of_week
154   -
155 155 ## Contributing
156 156  
157 157 1. Fork it
... ...