X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9018d1af07c53b03bf8caf0480b931dc25f57147..8adb486130d867070504c2c2c705fdfe74e5d394:/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