X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/b00b156ef46a8fb9ae62bd924de7d7c959963847..36592f72bca5e5670c01c2d259c3139e6eae54ad:/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.