Added onlyVerified for searching account.rb
• Added: - onlyVerified for searching account.rb • Todo: - fully implement
This commit is contained in:
parent
e72cb27362
commit
e4b7328174
|
@ -405,8 +405,9 @@ class Account < ApplicationRecord
|
||||||
DeliveryFailureTracker.filter(urls)
|
DeliveryFailureTracker.filter(urls)
|
||||||
end
|
end
|
||||||
|
|
||||||
def search_for(terms, limit = 10, offset = 0)
|
def search_for(terms, limit = 10, offset = 0, options = {})
|
||||||
textsearch, query = generate_query_for_search(terms)
|
textsearch, query = generate_query_for_search(terms)
|
||||||
|
@onlyVerified = options[:onlyVerified] || false
|
||||||
|
|
||||||
sql = <<-SQL.squish
|
sql = <<-SQL.squish
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -426,8 +427,9 @@ class Account < ApplicationRecord
|
||||||
records
|
records
|
||||||
end
|
end
|
||||||
|
|
||||||
def advanced_search_for(terms, account, limit = 10, following = false, offset = 0)
|
def advanced_search_for(terms, account, limit = 10, following = false, offset = 0, options = {})
|
||||||
textsearch, query = generate_query_for_search(terms)
|
textsearch, query = generate_query_for_search(terms)
|
||||||
|
@onlyVerified = options[:onlyVerified] || false
|
||||||
|
|
||||||
sql = <<-SQL.squish
|
sql = <<-SQL.squish
|
||||||
SELECT
|
SELECT
|
||||||
|
|
Loading…
Reference in New Issue