<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -38,12 +38,12 @@ class HushCMS::Post &lt; ActiveRecord::Base
   end
   
   def self.archives(options={})
-    all({
+    (all({
       :select =&gt; 'YEAR(published_at) as year, MONTH(published_at) as month, COUNT(*) as count',
       :conditions =&gt; 'published_at IS NOT NULL',
       :group =&gt; 'year, month',
       :order =&gt; 'year DESC, month DESC'}.merge(options)
-    ).inject([]) { |c, g| c &lt;&lt; { :year =&gt; g.year, :month =&gt; g.month, :count =&gt; g.count } }
+    ).inject([]) { |c, g| c &lt;&lt; (g.year ? { :year =&gt; g.year, :month =&gt; g.month, :count =&gt; g.count } : nil) }).compact
   end
   
   </diff>
      <filename>lib/models/hush_cms/post.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>491681a358c013be4d41e03af7dde46c7e6c7f73</id>
    </parent>
  </parents>
  <author>
    <name>James Brooks</name>
    <email>james@gooddogdesign.com</email>
  </author>
  <url>http://github.com/JamesBrooks/hush_cms/commit/04e9ce9d5e8a957aed23cd8dd1d133e12e95fc7c</url>
  <id>04e9ce9d5e8a957aed23cd8dd1d133e12e95fc7c</id>
  <committed-date>2009-04-07T19:24:29-07:00</committed-date>
  <authored-date>2009-04-07T19:24:29-07:00</authored-date>
  <message>Improved fix for archives</message>
  <tree>bc7ffc3b9fc782c9cabee446037cd508fed3a294</tree>
  <committer>
    <name>James Brooks</name>
    <email>james@gooddogdesign.com</email>
  </committer>
</commit>
