mirror of https://github.com/rails/rails
Making code branches explicit
Co-authored-by: Rafael Mendonça França <rafael@franca.dev>
This commit is contained in:
parent
b8e4640d72
commit
2cd7460152
|
@ -637,11 +637,11 @@ module ActionController # :nodoc:
|
||||||
uri = URI.parse(action_path)
|
uri = URI.parse(action_path)
|
||||||
|
|
||||||
if uri.relative? && (action_path.blank? || !action_path.start_with?("/"))
|
if uri.relative? && (action_path.blank? || !action_path.start_with?("/"))
|
||||||
return normalize_relative_action_path(uri.path)
|
normalize_relative_action_path(uri.path)
|
||||||
end
|
else
|
||||||
|
|
||||||
uri.path.chomp("/")
|
uri.path.chomp("/")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def normalize_relative_action_path(rel_action_path) # :doc:
|
def normalize_relative_action_path(rel_action_path) # :doc:
|
||||||
uri = URI.parse(request.path)
|
uri = URI.parse(request.path)
|
||||||
|
|
Loading…
Reference in New Issue