X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dbf35e0cf67ee330cd02c2431e0ed6d08681d184..97bb13595750d2ba5d03a5abe2ede7cd11a8a481:/app/controllers/messages_controller.rb diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index dacd00261..a95e2e587 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -119,8 +119,10 @@ class MessagesController < ApplicationController if @message.save && !request.xhr? flash[:notice] = t ".destroyed" - if params[:referer] - redirect_to safe_referer(params[:referer]) + referer = safe_referer(params[:referer]) if params[:referer] + + if referer + redirect_to referer else redirect_to :action => :inbox end