Expose validate_back_url as helper method (#32850).

Patch by Holger Just.

git-svn-id: http://svn.redmine.org/redmine/trunk@19487 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2020-02-02 08:38:47 +00:00
parent 914f57fefc
commit b3cda4fd61

View File

@@ -480,11 +480,13 @@ class ApplicationController < ActionController::Base
return path
end
private :validate_back_url
helper_method :validate_back_url
def valid_back_url?(back_url)
!!validate_back_url(back_url)
end
private :valid_back_url?
helper_method :valid_back_url?
# Redirects to the request referer if present, redirects to args or call block otherwise.
def redirect_to_referer_or(*args, &block)