<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -30,13 +30,13 @@ module ActionController
             &quot;#{path}/#{post_component_order.select { |c| [ :category, :year, :month ].include?(c) }.map { |c| &quot;:#{c}&quot; }.join('/')}&quot;,
             :controller =&gt; HushCMS.configuration['controllers']['posts'],
             :action =&gt; 'archive',
-            :requirements =&gt; { :year =&gt; /\d{4}/, :month =&gt; /\d{2}/ }
+            :requirements =&gt; { :year =&gt; post_component_order.include?(:year) ? /\d{4}/ : nil, :month =&gt; post_component_order.include?(:month) ? /\d{2}/ : nil }
             
           named_route 'hush_cms_post',
             &quot;#{path}/#{post_component_order.map { |c| &quot;:#{c}&quot; }.join('/')}&quot;,
             :controller =&gt; HushCMS.configuration['controllers']['posts'],
             :action =&gt; 'show',
-            :requirements =&gt; { :year =&gt; /\d{4}/, :month =&gt; /\d{2}/, :day =&gt; /\d{2}/ }
+            :requirements =&gt; { :year =&gt; post_component_order.include?(:year) ? /\d{4}/ : nil, :month =&gt; post_component_order.include?(:month) ? /\d{2}/ : nil, :day =&gt; post_component_order.include?(:day) ? /\d{2}/ : nil }
         end
         
         def hush_cms_admin(path)</diff>
      <filename>lib/extensions/mapper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,11 +31,15 @@ module HushCMSViewHelpers
 private
   def hush_cms_post_location(m, post)
     send m, {
-      :category =&gt; post.category.slug,
-      :year     =&gt; post.published_at.year,
-      :month    =&gt; '%02d' % post.published_at.month,
-      :day      =&gt; '%02d' % post.published_at.day,
-      :slug     =&gt; post.slug      
+      :category =&gt; named_route_uses_key?('hush_cms_post', :category) ? post.category.slug : nil,
+      :year     =&gt; named_route_uses_key?('hush_cms_post', :year)     ? post.published_at.year : nil,
+      :month    =&gt; named_route_uses_key?('hush_cms_post', :month)    ? '%02d' % post.published_at.month : nil,
+      :day      =&gt; named_route_uses_key?('hush_cms_post', :day)      ? '%02d' % post.published_at.day: nil,
+      :slug     =&gt; named_route_uses_key?('hush_cms_post', :slug)     ? post.slug : nil
     }
   end
+  
+  def named_route_uses_key?(named_route, key)
+    ActionController::Routing::Routes.named_routes[named_route].segment_keys.include?(key)
+  end
 end</diff>
      <filename>lib/helpers/hush_cms_view_helpers.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>96fc8698c314c77721e3d54cdfccadd37b3b6bc8</id>
    </parent>
  </parents>
  <author>
    <name>James Brooks</name>
    <email>james@gooddogdesign.com</email>
  </author>
  <url>http://github.com/JamesBrooks/hush_cms/commit/483cc3637e5eb2068497af7f8e23b8ed9778a271</url>
  <id>483cc3637e5eb2068497af7f8e23b8ed9778a271</id>
  <committed-date>2009-04-06T23:17:13-07:00</committed-date>
  <authored-date>2009-04-06T23:17:13-07:00</authored-date>
  <message>the hush_cms_post route helpers are now aware for what keys the route wants and will not provide extras. Route requirements for year/month/day are now only present if those keys are included in the options array passed to hush_cms_posts in routes.rb</message>
  <tree>dfad7d09e69bb7d59f50daac2772f68d7e73a68c</tree>
  <committer>
    <name>James Brooks</name>
    <email>james@gooddogdesign.com</email>
  </committer>
</commit>
