2019-06-18 13:41:15 Ruby

Ruby

Copy Copied! Full
def self.search(brand_names) Shop.includes(:brand_lists).select { |shop| shop.brand_list.any? { |brand| brand_names.include? brand } }.uniq end