From: Thomas Wood Date: Tue, 23 Dec 2008 15:08:18 +0000 (+0000) Subject: Pass the to_user to the view. Tests may follow. Closes #1394 X-Git-Tag: live~8526^2~82 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/60834f33f9f38f94fd824ea8cd0a3fe210fbf86b Pass the to_user to the view. Tests may follow. Closes #1394 --- diff --git a/app/controllers/message_controller.rb b/app/controllers/message_controller.rb index d2fa9bd5f..c039fe636 100644 --- a/app/controllers/message_controller.rb +++ b/app/controllers/message_controller.rb @@ -35,6 +35,7 @@ class MessageController < ApplicationController @body = "On #{message.sent_on} #{message.sender.display_name} wrote:\n\n#{message.body.gsub(/^/, '> ')}" @title = "Re: #{message.title.sub(/^Re:\s*/, '')}" @user_id = message.from_user_id + @to_user = User.find(message.to_user_id) render :action => 'new' rescue ActiveRecord::RecordNotFound render :action => 'no_such_user', :status => :not_found