app/services/concerns/query_operation.rb
def compile_query(*parts, join_with: " ", prefix: false)
    compiled = parts.flatten.map(&:presence).compact.join(join_with).strip

    return compiled unless prefix && compiled.present?

    "#{join_with}#{compiled}"
  end
# Join components of a query with the separator value in `join_with`.
#
# @param [<String>] parts
# @param [String] join_with
# @param [Boolean] prefix
# @return [String]
Join components of a query with the separator value in `join_with`.
Join components of a query with the separator value in ` join_with ` .
def compile_query(*parts, join_with: " ", prefix: false)
    compiled = parts.flatten.map(&:presence).compact.join(join_with).strip
    return compiled unless prefix && compiled.present?
    "#{join_with}#{compiled}"
  end
def compile_query ( * parts , join_with : " " , prefix : false ) compiled = parts . flatten . map ( & :presence ) . compact . join ( join_with ) . strip return compiled unless prefix && compiled . present? "#{join_with}#{compiled}" end
Join components of a query with the separator value in `join_with`.
Join components of a query with the separator value in ` join_with ` .
None
String
parts
join_with
prefix
None