Sha256: 5225a4bd5037bd3aecf20e23f3757b7550f64fc64476e085a81a7a9fd0e087b9
Contents?: true
Size: 429 Bytes
Versions: 31
Compression:
Stored size: 429 Bytes
Contents
module Recruiter module Filters class JobFilter < Base def init_query @query = Job.joins(city: :state).includes(city: :state) end def with_open_status(*args) merge(Job.open) end def with_city_id(id) merge { query.where(city_id: id) } end def with_state_id(id) merge { query.where(recruiter_cities: { state_id: id }) } end end end end
Version data entries
31 entries across 31 versions & 1 rubygems