<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -36,7 +36,7 @@ class Blogs &lt; Application
         @about = Category.first(:title =&gt; 'About')
         @blog  = Blog.last( :category_id.not =&gt; (@about ? @about.id : -1) )
       else
-        @blog = id ? Blog.first( id ) : Blog.first( :path_title =&gt; page_title, :year =&gt; year, :month =&gt; month )
+        @blog = id ? Blog.get( id ) : Blog.first( :path_title =&gt; page_title, :year =&gt; year, :month =&gt; month )
       end
       raise NotFound unless @blog
     end</diff>
      <filename>app/controllers/blogs.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 class Comments &lt; Application
-  provides :html, :rss
+  provides :html
   before :login_required, :exclude =&gt; %w(new create)
 
   def index
@@ -16,7 +16,7 @@ class Comments &lt; Application
   end
 
   def new
-    provides :js
+    provides :js, :html
     @blog = params[:blog_id] ? Blog.get( params[:blog_id] ) : nil
     @comment = Comment.new( :blog_id =&gt; params[:blog_id] )
     render
@@ -39,7 +39,8 @@ class Comments &lt; Application
         redirect( '/' )
       else
         flash[:notice] = 'Thanks for sharing!  Your comment will appear below.'
-        redirect( url(:blog_by_date, @comment.reload.blog) )
+        b = @comment.reload.blog
+        redirect( url(:blog_by_date, b.year, b.month, b.path_title) )
       end
     else
       render :new</diff>
      <filename>app/controllers/comments.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,7 @@ module Merb
       email   = '&lt;a href=&quot;mailto:%s&quot;&gt;Email&lt;/a&gt;' % comment.author_email if logged_in? &amp;&amp; comment.author_email
       confirm = &quot;return confirm('Are you certain you want to delete this comment?');&quot;
       delete  = delete_button(
-        :blog_comment, comment, 'Delete',
+        url(:blog_comment, comment.blog_id, comment.id), comment, 'Delete',
         {:style   =&gt; 'display:inline;'},
         {:onclick =&gt; confirm, :style =&gt; 'font-size:.8em' }
       )</diff>
      <filename>app/helpers/comments_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
   # Parameters:
   #  blog - blog object to edit or optionally create
 
-- action = blog.new_record? ? url(:new_admin_blog) : url(:edit_admin_blog, blog)
+- action = blog.new_record? ? url(:admin_blogs) : url(:edit_admin_blog, blog)
 - form_for( :blog, :action =&gt; action ) do
   - unless blog.new_record?
     %input{ :name =&gt; '_method', :type =&gt; 'hidden', :value =&gt; &quot;put&quot; }</diff>
      <filename>app/views/admin/blogs/_form.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@
 - error_li = lambda { |err| &quot;&lt;li&gt;#{ err.last.join('&lt;br /&gt;') }&lt;/li&gt;&quot; }
 = error_messages_for( @comment, error_li, 'errors' ) { |es| &quot;&lt;strong&gt;#{es.size} problem(s) prevented your comment from saving:&lt;/strong&gt;&quot; }
 
-- action = @comment.blog_id ? url(:new_blog_comment, @comment) : url(:new_comment)
+- action = @comment.blog_id ? url(:blog_comments) : url(:new_comment)
 - form_for( :comment, :action =&gt; action ) do
   %dl{ :class =&gt; &quot;#{ 'compact' if @comment.blog_id }&quot;}
     %dt= label_for( :author_name, 'Name*' )</diff>
      <filename>app/views/comments/_form.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@
     - for comment in blog.comments
       - next if comment.new_record?
       %li.dot
-        = print_date( comment.created_at )
+        = print_date( comment.created_at ) unless comment.created_at.nil?
         .comment
           %strong= link_to_author( comment )
           = comment.body</diff>
      <filename>app/views/comments/_index.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -53,7 +53,7 @@ dependencies &quot;merb_has_flash&quot;, 'paginator'
 dependencies &quot;dm-aggregates&quot;
 
 require 'lib/object_ext'
-dependencies 'lib/merb_router_behavior_ext', 'lib/merb_exceptions_ext'
+#dependencies 'lib/merb_router_behavior_ext', 'lib/merb_exceptions_ext'
 
 require File.join(File.dirname(__FILE__), '..', 'lib', 'authenticated_system/authenticated_dependencies') rescue LoadError
 </diff>
      <filename>config/init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -32,15 +32,15 @@ Merb::Router.prepare do
   resources :users
   resources :sessions
 
+  namespace :admin do |admin|
+    resources :blogs
+  end
+
   # RESTful routes
   resources :blogs do |b|
-    b.resources :comments
+    resources :comments
   end
 
-  namespace :admin do |admin|
-    admin.resources :blogs
-  end
-  
   resources :comments
   
   match(%r{/(\d+)/(\d+)/([a-zA-Z\-]+)}).to(</diff>
      <filename>config/router.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6409932ab3612f7770c751c2245a386ede1cda57</id>
    </parent>
  </parents>
  <author>
    <name>Aaron Wheeler</name>
    <email>oldaaronwheeler@aaron-wheelers-macbook-pro-15.local</email>
  </author>
  <url>http://github.com/fightinjoe/fightinjoe-merb-blog/commit/4e6f4ea9bbb86aad5a38739c21b2e2096e8907c8</url>
  <id>4e6f4ea9bbb86aad5a38739c21b2e2096e8907c8</id>
  <committed-date>2008-10-09T04:37:55-07:00</committed-date>
  <authored-date>2008-10-09T04:37:55-07:00</authored-date>
  <message>Fixed bugs with blog and comment creation</message>
  <tree>c6edfd466128849d86a5361d061ad72a6a9070eb</tree>
  <committer>
    <name>Aaron Wheeler</name>
    <email>oldaaronwheeler@aaron-wheelers-macbook-pro-15.local</email>
  </committer>
</commit>
