Sha256: 96f5c236a574182b06523e5448f8436f29ba6f3d1df4711c3f9e4041a70686ce

Contents?: true

Size: 332 Bytes

Versions: 31

Compression:

Stored size: 332 Bytes

Contents

module Recruiter
  class State < ActiveRecord::Base
    delegate  :to_s, to: :name
    validates :name, presence: true, uniqueness: { case_sensitive: false }
    validates :short, presence: true, uniqueness: { case_sensitive: false }

    scope :with_open_jobs, ->{ where(id: City.with_open_jobs.select(:state_id).uniq) }
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

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