Sha256: 199b85eeed7ad2bf267f129498fc29317f98acf489d8f7c213329947dc3ef690
Contents?: true
Size: 451 Bytes
Versions: 4
Compression:
Stored size: 451 Bytes
Contents
module RocketJobMissionControl module Jobs class Search attr_reader :results, :search_term def initialize(search_term, search_subset) @search_term = search_term @results = search_subset end def execute if !search_term.blank? @results = @results.where('$or' => [{_type: /#{search_term}/i}, {description: /#{search_term}/i}]) end @results end end end end
Version data entries
4 entries across 4 versions & 1 rubygems