Browse Source

add enum definition to logs for creation method

pull/1738/head
Arthur Campbell 3 years ago
parent
commit
45c190dc9c
  1. 6
      app/models/log.rb

6
app/models/log.rb

@ -20,6 +20,12 @@ class Log < ApplicationRecord
enum status: STATUS
enum status_cache: STATUS, _prefix: true
CREATION_METHOD = {
"single log" => 1,
"bulk upload" => 2,
}.freeze
enum creation_method: CREATION_METHOD
scope :visible, -> { where(status: %w[not_started in_progress completed]) }
scope :exportable, -> { where(status: %w[not_started in_progress completed deleted]) }

Loading…
Cancel
Save