Add search form for hidden content

Added search for comments and proposal_notifications, added tsv column
for search and rake tasks to update/create tsv vector.
This commit is contained in:
Jacek Skrzypacz
2019-03-20 11:35:41 +01:00
committed by Javi Martín
parent e66b9687a2
commit 2af7e32415
19 changed files with 254 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
class ProposalNotification < ApplicationRecord
include Graphqlable
include Notifiable
include Searchable
belongs_to :author, class_name: "User"
belongs_to :proposal
@@ -55,6 +56,17 @@ class ProposalNotification < ApplicationRecord
update(moderated: false)
end
def searchable_values
{
title => "A",
body => "B"
}
end
def self.search(terms)
pg_search(terms)
end
private
def set_author