From 1fbb403fbb939727051db107d8cb6e63931f6d95 Mon Sep 17 00:00:00 2001 From: Kim Griggs Date: Sat, 6 Oct 2012 23:46:50 -0700 Subject: [PATCH] update message post when thread is updated --- app/controllers/message_posts_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/message_posts_controller.rb b/app/controllers/message_posts_controller.rb index 4348f8f..5395884 100644 --- a/app/controllers/message_posts_controller.rb +++ b/app/controllers/message_posts_controller.rb @@ -53,7 +53,8 @@ def create flash[:notice] = "Posted: #{@message_post.subject}" format.html do if @message_post.thread - redirect_to forum_message_post_url(@forum, @message_post.thread, :anchor => @message_post.id, + @message_post.thread.update_attribute(:updated_at, Time.now) + redirect_to forum_message_post_url(@forum, @message_post.thread, :anchor => @message_post.id, :page => @message_post.thread.child_posts.last_page_number_for) else redirect_to forum_message_post_url(@forum, @message_post)