]> git.openstreetmap.org Git - rails.git/commitdiff
Show outbox after sending new message
authorAnton Khorev <tony29@yandex.ru>
Sat, 4 Jan 2025 15:09:27 +0000 (18:09 +0300)
committerAnton Khorev <tony29@yandex.ru>
Sat, 4 Jan 2025 15:24:47 +0000 (18:24 +0300)
app/controllers/messages_controller.rb
test/controllers/messages_controller_test.rb

index 26e8a5e09e6602d3a27508b8fb42a3d70b3acd5c..cc5f6c56d19dd4a6481534bc082eace36fa403ef 100644 (file)
@@ -49,7 +49,7 @@ class MessagesController < ApplicationController
     elsif @message.save
       flash[:notice] = t ".message_sent"
       UserMailer.message_notification(@message).deliver_later if @message.notify_recipient?
     elsif @message.save
       flash[:notice] = t ".message_sent"
       UserMailer.message_notification(@message).deliver_later if @message.notify_recipient?
-      redirect_to messages_inbox_path
+      redirect_to messages_outbox_path
     else
       @title = t "messages.new.title"
       render :action => "new"
     else
       @title = t "messages.new.title"
       render :action => "new"
index 9249908929426d32086ee4297f41d1cacf6198e1..b2bb71b1c71e8b1484983d9956f89487b55d5d21 100644 (file)
@@ -163,7 +163,7 @@ class MessagesControllerTest < ActionDispatch::IntegrationTest
         end
       end
     end
         end
       end
     end
-    assert_redirected_to messages_inbox_path
+    assert_redirected_to messages_outbox_path
     assert_equal "Message sent", flash[:notice]
     e = ActionMailer::Base.deliveries.first
     assert_equal [recipient_user.email], e.to
     assert_equal "Message sent", flash[:notice]
     e = ActionMailer::Base.deliveries.first
     assert_equal [recipient_user.email], e.to