X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/25b93471c1861b77190f15dac17b526619710858..a6c24e3e5b0ff5d5f60ad4d2eb0c212fa1eca11f:/app/controllers/message_controller.rb diff --git a/app/controllers/message_controller.rb b/app/controllers/message_controller.rb index fd638e4e7..4d53943ed 100644 --- a/app/controllers/message_controller.rb +++ b/app/controllers/message_controller.rb @@ -28,10 +28,10 @@ class MessageController < ApplicationController redirect_to :controller => 'message', :action => 'inbox', :display_name => @user.display_name end end - else - @message = Message.new(:recipient => @this_user) - @title = t 'message.new.title' end + + @message ||= Message.new(:recipient => @this_user) + @title = t 'message.new.title' end # Allow the user to reply to another message.