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

Version Path
recruiter-1.1.18 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.17 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.16 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.15 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.14 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.12 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.11 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.10 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.9 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.8 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.7 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.6 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.5 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.4 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.3 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.2 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.1 app/models/recruiter/filters/city_filter.rb
recruiter-1.1.0 app/models/recruiter/filters/city_filter.rb
recruiter-1.0.0 app/models/recruiter/filters/city_filter.rb
recruiter-0.1.5 app/models/recruiter/filters/city_filter.rb