diff options
| author | Robert | 2017-10-10 22:31:59 +0200 | 
|---|---|---|
| committer | Robert | 2017-10-12 17:49:51 +0200 | 
| commit | 8963eb80e71fb1932250f123367f6830b27fb025 (patch) | |
| tree | 77d80f5d8224c45d3f599bd56ac29f6eab5c3eb4 /app | |
| parent | 60c26e2e636ad43ab63208886fdc8c72bdca49c7 (diff) | |
| download | chouette-core-8963eb80e71fb1932250f123367f6830b27fb025.tar.bz2 | |
Refs: #4709@0.75h;
DONE:
  - Copied all node atts for ComplianceChecks
  - Migration of CompliancCheck#criticity int -> string
TODO:
  - Check what to do with attribute ComplianceCheck#type
Diffstat (limited to 'app')
| -rw-r--r-- | app/models/compliance_check.rb | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/compliance_check.rb b/app/models/compliance_check.rb index 4c29129b9..0a2576b71 100644 --- a/app/models/compliance_check.rb +++ b/app/models/compliance_check.rb @@ -1,8 +1,9 @@  class ComplianceCheck < ActiveRecord::Base +  extend Enumerize    belongs_to :compliance_check_set    belongs_to :compliance_check_block - -  enum criticity: [:info, :warning, :error] +   +  enumerize :criticity, in: %i(info warning error), scope: true, default: :warning    validates :criticity, presence: true    validates :name, presence: true    validates :code, presence: true  | 
