Browse Source

feat: add unconfirmed scope

pull/1455/head
natdeanlewissoftwire 3 years ago
parent
commit
5f1f147811
  1. 1
      app/models/location.rb

1
app/models/location.rb

@ -23,6 +23,7 @@ class Location < ApplicationRecord
scope :started, -> { where("startdate <= ?", Time.zone.today).or(where(startdate: nil)) }
scope :active, -> { where(confirmed: true).and(started) }
scope :confirmed, -> { where(confirmed: true) }
scope :unconfirmed, -> { where.not(confirmed: true) }
LOCAL_AUTHORITIES = LocalAuthority.all.map { |la| [la.name, la.code] }.to_h

Loading…
Cancel
Save