Skip to content

Commit

Permalink
speed up FindByPath.find on K8s/RDS environments
Browse files Browse the repository at this point in the history
  • Loading branch information
aldavidson committed Oct 12, 2023
1 parent 6498f48 commit 1b86cf7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/lib/find_by_path.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ def find(path)
return exact_match if exact_match

matches = find_route_matches(path)
matches.any? ? best_route_match(matches, path) : nil

if matches.count.positive?
best_route_match(matches, path)
end
end

private
Expand Down

0 comments on commit 1b86cf7

Please sign in to comment.