From 335078997851d1adfcd96a0473a0a9c3aa611785 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Sat, 4 Jan 2025 18:09:27 +0300 Subject: [PATCH] Show outbox after sending new message --- app/controllers/messages_controller.rb | 2 +- test/controllers/messages_controller_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 26e8a5e09..cc5f6c56d 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -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? - redirect_to messages_inbox_path + redirect_to messages_outbox_path else @title = t "messages.new.title" render :action => "new" diff --git a/test/controllers/messages_controller_test.rb b/test/controllers/messages_controller_test.rb index 924990892..b2bb71b1c 100644 --- a/test/controllers/messages_controller_test.rb +++ b/test/controllers/messages_controller_test.rb @@ -163,7 +163,7 @@ class MessagesControllerTest < ActionDispatch::IntegrationTest 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 -- 2.39.5