]> git.openstreetmap.org Git - rails.git/commitdiff
Render message properly on error
authorTom Hughes <tom@compton.nu>
Thu, 9 Feb 2017 20:20:55 +0000 (20:20 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 9 Feb 2017 20:20:55 +0000 (20:20 +0000)
app/controllers/message_controller.rb

index f4c465c93e6cfe2037235ce75cf5daba5308a7d6..450313e6247ca6262f14f0dd892cd4ad084770e4 100644 (file)
@@ -28,10 +28,10 @@ class MessageController < ApplicationController
           redirect_to :action => "inbox", :display_name => @user.display_name
         end
       end
           redirect_to :action => "inbox", :display_name => @user.display_name
         end
       end
-    else
-      @message ||= Message.new(message_params.merge(:recipient => @this_user))
-      @title = t "message.new.title"
     end
     end
+
+    @message ||= Message.new(message_params.merge(:recipient => @this_user))
+    @title = t "message.new.title"
   end
 
   # Allow the user to reply to another message.
   end
 
   # Allow the user to reply to another message.