app/models/concerns/issuable.rb
# Searches for records with a matching title.
#
# This method uses ILIKE on PostgreSQL and LIKE on MySQL.
#
# query - The search query as a String
#
# Returns an ActiveRecord::Relation.
Searches for records with a matching title.
This method uses ILIKE on PostgreSQL and LIKE on MySQL.

The search query as a String


Searches for records with a matching title . This method uses ILIKE on PostgreSQL and LIKE on MySQL . The search query as a String
def with_label(title)
      if title.is_a?(Array) && title.count > 1
        joins(:labels).where(labels: { title: title }).group('issues.id').having("count(distinct labels.title) = #{title.count}")
      else
        joins(:labels).where(labels: { title: title })
      end
    end
def with_label ( title ) if title . is_a? ( Array ) && title . count > 1 joins ( :labels ) . where ( labels : { title : title } ) . group ( 'issues.id' ) . having ( "count(distinct labels.title) = #{title.count}" ) else joins ( :labels ) . where ( labels : { title : title } ) end end
Searches for records with a matching title.
Searches for records with a matching title .
title