Sha256: 8d3a30cca92ce0dc4fe7713067ad55fc555bb2bbb13eb15d7534574b864bc888
Contents?: true
Size: 492 Bytes
Versions: 4
Compression:
Stored size: 492 Bytes
Contents
module RocketJobMissionControl module DirmonEntries 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' => [{job_class_name: /#{search_term}/i}, {name: /#{search_term}/i}, {pattern: /#{search_term}/i}]) end @results end end end end
Version data entries
4 entries across 4 versions & 1 rubygems