mirror of
https://github.com/redmine/redmine.git
synced 2025-12-17 22:10:27 +01:00
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:
@@ -480,11 +480,13 @@ class ApplicationController < ActionController::Base
|
|||||||
return path
|
return path
|
||||||
end
|
end
|
||||||
private :validate_back_url
|
private :validate_back_url
|
||||||
|
helper_method :validate_back_url
|
||||||
|
|
||||||
def valid_back_url?(back_url)
|
def valid_back_url?(back_url)
|
||||||
!!validate_back_url(back_url)
|
!!validate_back_url(back_url)
|
||||||
end
|
end
|
||||||
private :valid_back_url?
|
private :valid_back_url?
|
||||||
|
helper_method :valid_back_url?
|
||||||
|
|
||||||
# Redirects to the request referer if present, redirects to args or call block otherwise.
|
# Redirects to the request referer if present, redirects to args or call block otherwise.
|
||||||
def redirect_to_referer_or(*args, &block)
|
def redirect_to_referer_or(*args, &block)
|
||||||
|
|||||||
Reference in New Issue
Block a user