a11yist/app/models/success_criterion.rb
david 21ab02d647
Some checks failed
/ Run system tests (push) Waiting to run
/ Build, push and deploy image (push) Blocked by required conditions
/ Run tests (push) Has been cancelled
/ Checkout (push) Successful in 8m9s
Links, mainly...
2024-07-26 00:59:00 +02:00

15 lines
324 B
Ruby

class SuccessCriterion < ApplicationRecord
enum :result, %i[passed failed not_applicable]
enum :level, %i[A AA AAA]
has_rich_text :comment_html
has_rich_text :description_html
belongs_to :element, touch: true
def level_value
return nil unless level
self.class.levels.values.index_of(level)
end
end