<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>generators/bagpipes/templates/views/messages/index.html.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -8,6 +8,11 @@ class MessagesControllerTest &lt; ActionController::TestCase
     @topic = Topic.create! :title =&gt; &quot;Test Topic&quot;
   end
   
+  test &quot;index should render&quot; do
+    get :index, :topic_id =&gt; @topic.id
+    assert_template 'index'
+  end
+  
   test &quot;new should render&quot; do
     get :new, :topic_id =&gt; @topic.id
     assert_template 'new'
@@ -21,7 +26,7 @@ class MessagesControllerTest &lt; ActionController::TestCase
   
   test &quot;show unknown message should redirect&quot; do
     get :show, :topic_id =&gt; @topic.id, :id =&gt; 0
-    assert_redirected_to topic_path(@topic)
+    assert_redirected_to topic_messages_path(@topic)
   end
   
   test &quot;show unknown message should set flash&quot; do
@@ -57,7 +62,7 @@ class MessagesControllerTest &lt; ActionController::TestCase
   
   test &quot;good create should redirect&quot; do
     post :create, {:topic_id =&gt; @topic.id}.merge(good_params)
-    assert_redirected_to topic_path(@topic)
+    assert_redirected_to topic_messages_path(@topic)
   end
   
   test &quot;create reply should redirect elsewhere&quot; do</diff>
      <filename>generators/bagpipes/templates/test/functional/messages_controller_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 &lt;h1&gt;New Message in &lt;%= h @topic.title %&gt;&lt;/h1&gt;
 
-&lt;p&gt;&lt;%= link_to 'Back to Messages', @topic %&gt;&lt;/p&gt;
+&lt;p&gt;&lt;%= link_to 'Back to Messages', topic_messages_path(@topic) %&gt;&lt;/p&gt;
 
 &lt;% form_for @message, :url =&gt; topic_messages_path(@topic) do |f| %&gt;
   &lt;%= f.hidden_field :parent_id %&gt;</diff>
      <filename>generators/bagpipes/templates/views/messages/new.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 &lt;h1&gt;
   &lt;span&gt;
-    &lt;%= link_to h(@topic.title), @topic %&gt; &amp;gt;
+    &lt;%= link_to h(@topic.title), topic_messages_path(@topic) %&gt; &amp;gt;
     &lt;% if @message.parent %&gt;
       &lt;%= link_to h(@message.parent.title), topic_message_path(@topic, @message.parent) %&gt; &amp;gt;
     &lt;% end %&gt;</diff>
      <filename>generators/bagpipes/templates/views/messages/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,7 @@
   &lt;% @topics.each_with_index do |topic, i| %&gt;
     &lt;tr class=&quot;&lt;%= i%2 == 1 ? 'even' : 'odd' %&gt;&quot;&gt;
       &lt;td&gt;
-        &lt;%= link_to h(topic.title), topic %&gt;
+        &lt;%= link_to h(topic.title), topic_messages_path(topic) %&gt;
       &lt;/td&gt;
       &lt;td class=&quot;counter&quot;&gt;
         &lt;%= topic.messages.children_of(nil).count %&gt;</diff>
      <filename>generators/bagpipes/templates/views/topics/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -4,14 +4,14 @@ module Bagpipes
       def self.included(base)
         base.class_eval do
           before_filter :require_topic
-          before_filter :require_member_login, :except =&gt; :show
+          before_filter :require_member_login, :except =&gt; [:show, :index]
 
           layout 'bagpipes'
         end
       end
 
-      # TODO: add index action for showing all messages in a topic
       # TODO: provide modular search for messages via index action
+      def index; end
 
       def new
         @parent = @topic.messages.find_by_id(params[:parent_id])
@@ -28,7 +28,7 @@ module Bagpipes
         @message = @topic.messages.find(params[:id])
       rescue ActiveRecord::RecordNotFound
         flash[:error] = &quot;This message no longer exists&quot;
-        redirect_to @topic
+        redirect_to topic_messages_path(@topic)
       end
 
       def create
@@ -36,7 +36,7 @@ module Bagpipes
 
         if @message.save
           flash[:notice] = &quot;You have created a new message in \&quot;#{@topic.title}\&quot;&quot;
-          redirect_to @message.parent ? topic_message_path(@topic, @message.parent) : @topic
+          redirect_to @message.parent ? topic_message_path(@topic, @message.parent) : topic_messages_path(@topic)
         else
           flash.now[:form_error] = @message
           render :action =&gt; 'new'</diff>
      <filename>lib/bagpipes/controllers/messages_controller.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>generators/bagpipes/templates/views/topics/show.html.erb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>f9de0ebd00280bca0a208245a0a6730f6f81177b</id>
    </parent>
  </parents>
  <author>
    <name>Ben Scofield</name>
    <email>git@turrean.com</email>
  </author>
  <url>http://github.com/bscofield/bagpipes/commit/af96f0c20098624ec2cbd7c7c07108694d061ace</url>
  <id>af96f0c20098624ec2cbd7c7c07108694d061ace</id>
  <committed-date>2008-09-11T03:30:17-07:00</committed-date>
  <authored-date>2008-09-11T03:30:17-07:00</authored-date>
  <message>switch from using topics#show to messages#index</message>
  <tree>5f7b4e8b41cad5575573da507c1590c625968114</tree>
  <committer>
    <name>Ben Scofield</name>
    <email>git@turrean.com</email>
  </committer>
</commit>
