X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/25510b6616261efff26763debbfc34040bd67176..2731e7244ac554c4a17f69347851f8f829cd1caa:/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