BigW Consortium Gitlab

Commit 9807ffaa by Yorick Peterse Committed by Lin Jen-Shin

Merge branch 'routes-lower-case' into 'master'

Remove repeated routes.path check for postgresql database See merge request !10063
parent b340fd88
...@@ -51,11 +51,13 @@ module Routable ...@@ -51,11 +51,13 @@ module Routable
paths.each do |path| paths.each do |path|
path = connection.quote(path) path = connection.quote(path)
where = "(routes.path = #{path})"
if cast_lower where =
where = "(#{where} OR (LOWER(routes.path) = LOWER(#{path})))" if cast_lower
end "(LOWER(routes.path) = LOWER(#{path}))"
else
"(routes.path = #{path})"
end
wheres << where wheres << where
end end
......
---
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