1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-17 11:54:22 +01:00

source for building search engine

This commit is contained in:
Sylvain 2020-06-17 16:56:10 +02:00
parent a164ec402d
commit 7af6f18973

View File

@ -89,6 +89,7 @@ class Project < ApplicationRecord
connection = ActiveRecord::Base.connection
return unless connection.instance_values['config'][:adapter] == 'postgresql'
# see http://rachbelaid.com/postgres-full-text-search-is-good-enough/
return connection.execute <<~SQL
SELECT pid, p_name
FROM (SELECT projects.id as pid,