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:
committed by
Javi Martín
parent
e66b9687a2
commit
2af7e32415
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user