X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dbf35e0cf67ee330cd02c2431e0ed6d08681d184..53aa7259bb0612eb48a17d0b954ad71ea37d87a4:/app/controllers/messages_controller.rb?ds=inline 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