Redirect to inbox after marking a message as read/unread disregarding referer
Avoids staying on the message page after the "Mark as unread" button is clicked and immediately reading the message again.
This commit is contained in:
parent
4c21a09b32
commit
5da2957591
2 changed files with 7 additions and 7 deletions
|
@ -127,7 +127,7 @@ class MessagesController < ApplicationController
|
|||
@message.message_read = message_read
|
||||
if @message.save
|
||||
flash[:notice] = notice
|
||||
redirect_back_or_to inbox_messages_path, :status => :see_other
|
||||
redirect_to inbox_messages_path, :status => :see_other
|
||||
end
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
@title = t "messages.no_such_message.title"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue