Add screenshots to elements
This commit is contained in:
parent
c7c6023acf
commit
2293751fe2
18 changed files with 232 additions and 20 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue