Sha256: 6aeb2e82a369a447c412a94b666cd6ee7b0cf9a90e11b918707d50ea16a71a62
Contents?: true
Size: 401 Bytes
Versions: 31
Compression:
Stored size: 401 Bytes
Contents
module Recruiter module Filters class CityFilter < Base def init_query @query = City.order('name') end def with_jobs(*args) merge(query.where(id: Job.select(:city_id).uniq)) end def with_open_jobs(*args) merge(City.with_open_jobs) end def with_state_id(id) merge(query.where(state_id: id)) end end end end
Version data entries
31 entries across 31 versions & 1 rubygems