<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/controllers/admin/posts_controller.rb</filename>
    </added>
    <added>
      <filename>app/views/admin/posts/_fields.html.haml</filename>
    </added>
    <added>
      <filename>app/views/admin/posts/edit.html.haml</filename>
    </added>
    <added>
      <filename>app/views/admin/posts/index.html.haml</filename>
    </added>
    <added>
      <filename>app/views/admin/posts/new.html.haml</filename>
    </added>
    <added>
      <filename>app/views/admin/posts/show.html.haml</filename>
    </added>
    <added>
      <filename>db/migrate/20091021210446_add_excerpt_to_posts.rb</filename>
    </added>
    <added>
      <filename>test/functional/admin/posts_controller_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -8,7 +8,7 @@ class Post &lt; ActiveRecord::Base
   validates_presence_of :title, :body, :user
   validate_on_create :validate_user_is_author
   
-  before_save :cache_body_html
+  before_save :cache_html
   
   named_scope :ordered, :order =&gt; 'id DESC'
   
@@ -18,9 +18,14 @@ class Post &lt; ActiveRecord::Base
   
   protected
   
-    def cache_body_html
+    def cache_html
       blue_cloth = BlueCloth::new(body)
       self.body_html = blue_cloth.to_html
+      
+      unless excerpt.blank?
+        blue_cloth = BlueCloth::new(excerpt)
+        self.excerpt_html = blue_cloth.to_html
+      end
     end
   
     def validate_user_is_author</diff>
      <filename>app/models/post.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
   #nav-bar
     %ul
       %li= link_to 'Dashboard', admin_dashboard_path, :class =&gt; active_if_here(:dashboards)
-      %li= link_to 'Blog',      '#'
+      %li= link_to 'Posts',     admin_posts_path,     :class =&gt; active_if_here(:posts)
       %li= link_to 'Pages',     admin_pages_path,     :class =&gt; active_if_here(:pages)
       %li= link_to 'Users',     '#',                  :class =&gt; active_if_here(:users)
     %div.clear
\ No newline at end of file</diff>
      <filename>app/views/admin/shared/_navigation.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -9,4 +9,5 @@
     - if index
       = link_to pluralize(post.comments.count, 'comment'), post_path(post, :anchor =&gt; 'comments'), :class =&gt; 'comments'
 
-  .html= post.body_html
\ No newline at end of file
+  .html
+    = index &amp;&amp; !post.excerpt.blank? ? post.excerpt_html : post.body_html
\ No newline at end of file</diff>
      <filename>app/views/posts/_post.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -5,4 +5,5 @@ per_page:
   
 # Admin Pagination limits
 admin_per_page:
-  pages: 10
\ No newline at end of file
+  pages: 10
+  posts: 10
\ No newline at end of file</diff>
      <filename>config/config.yml</filename>
    </modified>
    <modified>
      <diff>@@ -24,6 +24,7 @@ ActionController::Routing::Routes.draw do |map|
     admin.logout    '/logout',  :controller =&gt; 'user_sessions', :action =&gt; :destroy
     
     admin.resources :pages
+    admin.resources :posts
     
     admin.root :controller =&gt; 'dashboards', :action =&gt; 'show'
   end</diff>
      <filename>config/routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@ body {
 .clear        { clear: both; }
 .clear-left   { clear: left; }
 .clear-right  { clear: right; }
+.nowrap       { white-space: nowrap; }
 
 /* Headings */
 h1, h2, h3, h4, h5, h6 { padding: 0.2em 0; margin-bottom: 1em; border-bottom: 1px solid #E2E2E2;}
@@ -119,6 +120,7 @@ form textarea {
   font-size: inherit; font-family: inherit;
   color: #787878; border: 1px solid #C6C6C6;
 }
+form textarea.short { height: 8em; }
 form input[type=submit] {
   display:block; width: auto; padding: 0.5em;
   font-size: 1.2em; line-height: 1em; text-transform: uppercase;</diff>
      <filename>public/stylesheets/admin/admin.css</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@ class PostsControllerTest &lt; ActionController::TestCase
   
   context &quot;GET /posts&quot; do
     setup do
-      @posts = []
+      @posts = WillPaginate::Collection.new(1, App.per_page[:posts], 3)
       3.times {|t| @posts &lt;&lt; Factory.build(:post, :url =&gt; &quot;post-#{t}&quot;, :created_at =&gt; 1.day.ago)}
       Post.stubs(:ordered).returns(@posts).stubs(:paginate).returns(@posts)
       get :index</diff>
      <filename>test/functional/posts_controller_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e224c988575713cfe8cb401e32cf2bbfc4c5939c</id>
    </parent>
  </parents>
  <author>
    <name>jdpace</name>
    <email>jared@codewordstudios.com</email>
  </author>
  <url>http://github.com/jdpace/hubbub/commit/52c51a0a9abd00316ee37fe4c842817ea9ce98f1</url>
  <id>52c51a0a9abd00316ee37fe4c842817ea9ce98f1</id>
  <committed-date>2009-10-21T14:44:52-07:00</committed-date>
  <authored-date>2009-10-21T14:44:52-07:00</authored-date>
  <message>Add an admin interface for dealing with posts</message>
  <tree>fdd9df9b288082bb33fad66b71b1419a8cad291f</tree>
  <committer>
    <name>jdpace</name>
    <email>jared@codewordstudios.com</email>
  </committer>
</commit>
