<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/helpers/sessions_helper.rb</filename>
    </added>
    <added>
      <filename>db/migrate/006_remove_comments.rb</filename>
    </added>
    <added>
      <filename>db/migrate/007_create_commentable_schema.rb</filename>
    </added>
    <added>
      <filename>lib/ActionView/base.rb</filename>
    </added>
    <added>
      <filename>spec/helpers/sessions_helper_spec.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/acts_as_commentable/CHANGELOG</filename>
    </added>
    <added>
      <filename>vendor/plugins/acts_as_commentable/MIT-LICENSE</filename>
    </added>
    <added>
      <filename>vendor/plugins/acts_as_commentable/README</filename>
    </added>
    <added>
      <filename>vendor/plugins/acts_as_commentable/init.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/acts_as_commentable/install.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/acts_as_commentable/lib/acts_as_commentable.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/acts_as_commentable/lib/comment.rb</filename>
    </added>
    <added>
      <filename>vendor/plugins/acts_as_commentable/tasks/acts_as_commentable_tasks.rake</filename>
    </added>
    <added>
      <filename>vendor/plugins/acts_as_commentable/test/acts_as_commentable_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,2 +1,4 @@
 class CommentsController &lt; ResourceController::Base
+  belongs_to :post
+  
 end</diff>
      <filename>app/controllers/comments_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 class PostsController &lt; ResourceController::Base
-  
+
   new_action.wants.html do
     for_admin_only do
       render :html =&gt; @posts</diff>
      <filename>app/controllers/posts_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,47 +5,6 @@ module ApplicationHelper
   end
   
   def format_date_short(date)
-    date.strftime(&quot;%D&quot;)
-  end
-end
-
-# Move this to 'lib' once I find out how to load from 'lib'
-module ActionView
-	class Base
-	
-		def method_missing(symbol, *args)
-      if symbol.to_s. =~ /_label$/
-        self.class.instance_eval do
-
-        define_method(symbol){
-  				options = args[1] || {}
-  				options = args[0] if args[0].class == Hash
-
-  				prompt_char = options[:prompt_char] || ':'
-  				is_required = options[:is_required] || false
-  				required_char =  options[:required_char] || '*'
-  				label_text = args[0].class == String ? args[0] : symbol.to_s.gsub(/_label/, '').to_friendly_name
-
-  				label(:post, symbol.to_s.gsub(/_label/, ''), label_text) + (is_required ? required_char : '') + prompt_char
-        }
-
-        send symbol
-
-        end
-
-			end
-			
-		end
-
-	end
-	
-end
-
-class String
-  def to_friendly_name
-  	s = self.gsub(/[_]/, ' ')
-  	ns = &quot;&quot;
-  	s.each(&quot;\s&quot;){|w| ns &lt;&lt; w.capitalize }
-  	return ns
+    date.to_s(:short_date_only)
   end
 end
\ No newline at end of file</diff>
      <filename>app/helpers/application_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,5 @@
-require 'lib/string'
-
 class Post &lt; ActiveRecord::Base
-  has_many :comments
+  acts_as_commentable
   
   def body=(value)
     self[:body] = value.gsub(&quot;\n&quot;, &quot;&lt;br&gt;&quot;)</diff>
      <filename>app/models/post.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,11 +19,11 @@
       %img{ :src =&gt; &quot;/images/glasses.png&quot; }/
       %h1
         %a{ :href =&gt; &quot;/&quot; }
-          %em
-            faithfulgeek.org
+          faithfulgeek.org
     #main
-      #page-content
-        = yield
+      #wrapper
+        #page-content
+          = yield
       #modules
         .twitter.module
           %fieldset</diff>
      <filename>app/views/layouts/application.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -4,22 +4,22 @@
 
 &lt;% form_for(@post) do |f| %&gt;
   &lt;p&gt;
-    &lt;b&gt;Title&lt;/b&gt;&lt;br /&gt;
+    &lt;b&gt;&lt;%= title_label %&gt;&lt;/b&gt;&lt;br /&gt;
     &lt;%= f.text_field :title %&gt;
   &lt;/p&gt;
 
   &lt;p&gt;
-    &lt;b&gt;Body&lt;/b&gt;&lt;br /&gt;
+    &lt;b&gt;&lt;%= body_label %&gt;&lt;/b&gt;&lt;br /&gt;
     &lt;%= f.text_area :body %&gt;
   &lt;/p&gt;
 
   &lt;p&gt;
-    &lt;b&gt;Excerpt&lt;/b&gt;&lt;br /&gt;
+    &lt;b&gt;&lt;%= excerpt_label %&gt;&lt;/b&gt;&lt;br /&gt;
     &lt;%= f.text_area :excerpt %&gt;
   &lt;/p&gt;
 
   &lt;p&gt;
-    &lt;b&gt;Is published&lt;/b&gt;&lt;br /&gt;
+    &lt;b&gt;&lt;%= is_published_label %&gt;&lt;/b&gt;&lt;br /&gt;
     &lt;%= f.check_box :is_published %&gt;
   &lt;/p&gt;
 </diff>
      <filename>app/views/posts/new.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,30 @@
 = render_partial 'post', @post
 
-- form_for([@post, Comment.new], :html =&gt; {:id =&gt; 'comment-submission'}) do |f|
-/
-  %p
-    .form-field
-      = #label :name, 'Name:'
-      = #f.text_field :name
-      = #f.text_field :email
-      = #f.text_field :url
-      = #f.text_area :body
+.comments
+  - @post.comments.each do |c|
+    .comment
+      - if c.url
+        = link_to c.name, c.url
+      - else
+        = c.name
+      says:
+      %p.comment-body
+        = c.comment
 
-- end
\ No newline at end of file
+%fieldset
+  %legend Voice Your Opinion!
+  - form_for([@post, Comment.new], :html =&gt; {:id =&gt; 'comment-submission'}) do |f|
+
+    %p
+      .form-field
+        = label :name, 'Name:'
+        = f.text_field :name
+      .form-field
+        = label :email, 'Email:'
+        = f.text_field :email
+      .form-field
+        = label :url, 'URL:'
+        = f.text_field :url
+      .form-field
+        = f.text_area :comment
+        = submit_tag</diff>
      <filename>app/views/posts/show.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -10,6 +10,8 @@ RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
 # Bootstrap the Rails environment, frameworks, and default configuration
 require File.join(File.dirname(__FILE__), 'boot')
 
+Time::DATE_FORMATS[:short_date_only] = &quot;%D&quot;
+
 Rails::Initializer.run do |config|
   # Settings in config/environments/* take precedence over those specified here.
   # Application configuration should go into files in config/initializers
@@ -56,4 +58,6 @@ Rails::Initializer.run do |config|
 
   # Make Active Record use UTC-base instead of local time
   # config.active_record.default_timezone = :utc
-end
\ No newline at end of file
+end
+
+require 'lib/ActionView/base'
\ No newline at end of file</diff>
      <filename>config/environment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,10 +5,8 @@ ActionController::Routing::Routes.draw do |map|
   map.login 'login', :controller =&gt; 'sessions', :action =&gt; 'new'
   map.logout 'logout', :controller =&gt; 'sessions', :action =&gt; 'destroy'
   
-  map.resources :posts do |post|
-    post.resources :comments
-  end
-  
+  map.resources :posts, :has_many =&gt; :comments
+    
   map.connect '/:month',
               :controller =&gt; 'posts',
               :action =&gt; 'index',</diff>
      <filename>config/routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -34,17 +34,10 @@ p
 
 fieldset
 {
-	border: 1px inset #999;
+	border: 1px dashed #999;
 	padding: .5em;
 }
 
-legend
-{
-	font-size: 1em;
-	background: url('/images/icons/16-tool-a.png') no-repeat;
-	padding-left:18px;
-}
-
 #main
 {
 	margin-left: auto;
@@ -55,13 +48,19 @@ legend
 	margin-top: 1em;
 }
 
-#page-content
+#wrapper
 {
 	float: left;
 	width: 100%;
 	padding-right: .75em;
 }
 
+#page-content
+{
+	margin-right: 310px;
+	padding-bottom: 1em;	
+}
+
 #modules
 {
 	margin-left: -310px;
@@ -89,11 +88,7 @@ legend
 	margin:55px 0 30px 15px;
 	background: url('/images/logo.jpg') no-repeat;
 	display:block;
-}
-
-#header h1 em
-{
-	display: none;
+	text-indent: -9999px;
 }
 
 #footer
@@ -108,11 +103,7 @@ legend
 {
 	margin-bottom: 1em;
 }
-.post
-{
-	margin-right: 310px;
-	padding-bottom: 1em;
-}
+
 .post-content
 {
 	text-align: left;
@@ -149,3 +140,9 @@ legend
 	padding-left: 18px;
 }
 
+div.post-content legend
+{
+	font-size: 1em;
+	background: url('/images/icons/16-tool-a.png') no-repeat;
+	padding-left:18px;
+}</diff>
      <filename>public/stylesheets/site.css</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../spec_helper'
 
 describe Post do
   it &quot;should have many comments&quot; do
-    Post.should_receive(:has_many).with(:comments)
+    Post.should_receive(:acts_as_commentable)
     load 'post.rb'
   end
 end
@@ -29,7 +29,7 @@ describe Post do
     @post.save
     
     post = Post.find(:first)
-    post.comments.size.should == 1
+    post.comments.length.should == 1
   end
   
   it &quot;should replace new lines with &lt;br&gt; when setting body&quot; do</diff>
      <filename>spec/models/post_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -18,15 +18,13 @@ describe &quot;/posts/show.html.haml&quot; do
   end
   
   it &quot;should render add comment form&quot; do
-    pending &quot;saving comments for a future sprint&quot; do
       render &quot;/posts/show&quot;
       response.should have_tag(&quot;form#comment-submission&quot;) do 
         response.should have_tag(&quot;label&quot;, &quot;Name:&quot;)
         response.should have_tag(&quot;input#comment_name&quot;)
         response.should have_tag(&quot;input#comment_email&quot;)
         response.should have_tag(&quot;input#comment_url&quot;)
-        response.should have_tag(&quot;textarea#comment_body&quot;)
-      end
+        response.should have_tag(&quot;textarea#comment_comment&quot;)
     end
   end
 end</diff>
      <filename>spec/views/posts/show.html.haml_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>app/models/comment.rb</filename>
    </removed>
    <removed>
      <filename>lib/string.rb</filename>
    </removed>
    <removed>
      <filename>spec/models/comment_spec.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>754d289290aa6bac67a4dbce9f04c1d82f0a87cb</id>
    </parent>
  </parents>
  <author>
    <name>Joe Fiorini</name>
    <email>joe@joe-fiorinis-macbook-pro.local</email>
  </author>
  <url>http://github.com/faithfulgeek/blog-starter-kit/commit/3ec125e4465956c74a77b3a8d43e6828f947364f</url>
  <id>3ec125e4465956c74a77b3a8d43e6828f947364f</id>
  <committed-date>2008-04-12T22:00:11-07:00</committed-date>
  <authored-date>2008-04-12T22:00:11-07:00</authored-date>
  <message>Added initial comments implementation; implemented suggestions from code review with Corey; design changes to allow for better resizing</message>
  <tree>36b5fac1140f124b61de5b23f27be0cfaab88464</tree>
  <committer>
    <name>Joe Fiorini</name>
    <email>joe@joe-fiorinis-macbook-pro.local</email>
  </committer>
</commit>
