Reinstate stripping of Re: prefixes that Steve dropped...
authorTom Hughes <tom@compton.nu>
Mon, 5 May 2008 22:46:56 +0000 (22:46 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 5 May 2008 22:46:56 +0000 (22:46 +0000)
app/controllers/message_controller.rb

index 8aecef98e56a87059595550c72064170fca66501..5c435710fe05ed96fa506eb72cd929d9c31b44f2 100644 (file)
@@ -35,7 +35,7 @@ class MessageController < ApplicationController
   def reply
     message = Message.find(params[:message_id], :conditions => ["to_user_id = ? or from_user_id = ?", @user.id, @user.id ])
     @body = "\n\nOn #{message.sent_on} #{message.sender.display_name} wrote:\n #{message.body}" 
-    @title = "Re: #{message.title}"
+    @title = "Re: #{message.title.sub(/^Re:\s*/, '')}"
     @user_id = message.from_user_id
     render :action => 'new'
   rescue ActiveRecord::RecordNotFound