Making code branches explicit

Co-authored-by: Rafael Mendonça França <rafael@franca.dev>
This commit is contained in:
Gabriel Amaral 2024-03-07 15:19:08 -05:00
parent b8e4640d72
commit 2cd7460152
1 changed files with 3 additions and 3 deletions

View File

@ -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)