Commit 666c20cb authored by mhasbini's avatar mhasbini
Browse files

Remove repeated routes.path check for postgresql database

parent 736803feb02b
...@@ -51,10 +51,12 @@ def where_full_path_in(paths) ...@@ -51,10 +51,12 @@ def where_full_path_in(paths)
paths.each do |path| paths.each do |path|
path = connection.quote(path) path = connection.quote(path)
where = "(routes.path = #{path})"
where =
if cast_lower if cast_lower
where = "(#{where} OR (LOWER(routes.path) = LOWER(#{path})))" "(LOWER(routes.path) = LOWER(#{path}))"
else
"(routes.path = #{path})"
end end
wheres << where wheres << where
......
---
title: Remove repeated routes.path check for postgresql database
merge_request:
author: mhasbini
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment