Add screenshots to elements
Some checks failed
/ Run tests (push) Failing after 1m43s
/ Run system tests (push) Failing after 2m10s
/ Build, push and deploy image (push) Has been skipped

This commit is contained in:
david 2024-11-12 22:43:59 +01:00
parent c7c6023acf
commit 2293751fe2
18 changed files with 232 additions and 20 deletions

View file

@ -11,6 +11,10 @@ class Element < ApplicationRecord
before_validation :set_position
before_update :update_positions, if: :position_changed?
has_one_attached :screenshot do |attachable|
attachable.variant :thumbnail, resize_to_limit: [ 200, 200 ]
end
# Calculate actual conformity level:
# - if a success_criterion has result :failed -> the confirmity_level
# of that success_criterion is not reached.