Merge remote-tracking branch 'parent/main' into kb_migration

This commit is contained in:
KMY 2023-09-01 18:05:03 +09:00
commit 621a41b670
29 changed files with 640 additions and 300 deletions

View file

@ -1,9 +1,10 @@
# frozen_string_literal: true
class SearchService < BaseService
def call(query, account, limit, options = {})
@query = query&.strip
QUOTE_EQUIVALENT_CHARACTERS = /[“”„«»「」『』《》]/
def call(query, account, limit, options = {})
@query = query&.strip&.gsub(QUOTE_EQUIVALENT_CHARACTERS, '"')
@account = account
@options = options
@limit = limit.to_i