filetype comparison needs to be case insensitive
This commit is contained in:
parent
e2e0221dd7
commit
bc9270defb
|
@ -57,7 +57,8 @@ SQL
|
|||
|
||||
builder.where('ftl.topic_id = :topic_id', topic_id: topic_id)
|
||||
builder.where('ft.deleted_at IS NULL')
|
||||
builder.where("NOT(ftl.url LIKE '%.png' OR ftl.url LIKE '%.jpg' OR ftl.url LIKE '%.gif')")
|
||||
# note that ILIKE means "case insensitive LIKE"
|
||||
builder.where("NOT(ftl.url ILIKE '%.png' OR ftl.url ILIKE '%.jpg' OR ftl.url ILIKE '%.gif')")
|
||||
builder.where("COALESCE(ft.archetype, 'regular') <> :archetype", archetype: Archetype.private_message)
|
||||
|
||||
builder.secure_category(guardian.secure_category_ids)
|
||||
|
|
Loading…
Reference in New Issue