Fix text serializer and file activity logging

This commit is contained in:
Martin Artnik 2022-06-02 11:32:31 +02:00
parent 9abbe22c26
commit 02c813bf06
2 changed files with 4 additions and 2 deletions

View file

@ -221,7 +221,7 @@ class AssetsController < ApplicationController
@assoc,
@assoc.my_module.experiment.project,
my_module: @assoc.my_module.id,
file: @asset.file_file_name
file: @asset.file_name
)
else
log_step_activity(
@ -229,7 +229,7 @@ class AssetsController < ApplicationController
@assoc,
nil,
protocol: @assoc.protocol.id,
file: @asset.file_file_name
file: @asset.file_name
)
end
when Result

View file

@ -11,6 +11,8 @@ class StepText < ApplicationRecord
has_many :step_orderable_elements, as: :orderable, dependent: :destroy
def name
return if text.blank?
strip_tags(text.truncate(64))
end
end