<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -17,17 +17,14 @@ class PostsController &lt; ApplicationController
   end
 
   def create
-    @topic = Topic.find(params[:topic_id], :include =&gt; :posts)
-    
-    # The last 10 posts for this topic
-    @posts = @topic.posts.find(:all, :order =&gt; &quot;id DESC&quot;, :limit =&gt; 10)
-    
     @post = @topic.posts.build(params[:post].merge!(:user =&gt; current_user, :ip =&gt; @ip))
     
     if @post.save
       flash[:notice] = t(:created, :thing =&gt; &quot;post&quot;)
       go_directly_to_post
     else
+      # The last 10 posts for this topic
+      @posts = @topic.last_10_posts
       @quoting_post = Post.find(params[:quote]) unless params[:quote].blank?
       flash.now[:notice] = t(:not_created, :thing =&gt; &quot;post&quot;)
       render :action =&gt; &quot;new&quot;</diff>
      <filename>app/controllers/posts_controller.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e6a65ad4ac2a19673300a3e74055dd9efcc5f787</id>
    </parent>
  </parents>
  <author>
    <name>Ryan Bigg</name>
    <email>radarlistener@gmail.com</email>
  </author>
  <url>http://github.com/radar/rboard/commit/4b978cb2e0ab989b727560b1c25844d479211d27</url>
  <id>4b978cb2e0ab989b727560b1c25844d479211d27</id>
  <committed-date>2009-11-06T05:20:49-08:00</committed-date>
  <authored-date>2009-10-23T15:33:58-07:00</authored-date>
  <message>Topic is already gathered by find_topic, we only care about the last 10 posts when the save fails</message>
  <tree>276b5fd58f69fdb26310ddaf03a5231d0eaa0738</tree>
  <committer>
    <name>Ryan Bigg</name>
    <email>radarlistener@gmail.com</email>
  </committer>
</commit>
