]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/message_controller.rb
There is no routing.js to compile
[rails.git] / app / controllers / message_controller.rb
index fd638e4e7758b26df7be6d2bd42c7a963e9716c0..c7acc90d8f2680438d07573a06e1d30ca774cebc 100644 (file)
@@ -24,14 +24,14 @@ class MessageController < ApplicationController
 
         if @message.save
           flash[:notice] = t 'message.new.message_sent'
-          Notifier.message_notification(@message).deliver
+          Notifier.message_notification(@message).deliver_now
           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.