mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-09 21:36:44 +08:00
Fix text serializer and file activity logging
This commit is contained in:
parent
9abbe22c26
commit
02c813bf06
2 changed files with 4 additions and 2 deletions
|
@ -221,7 +221,7 @@ class AssetsController < ApplicationController
|
||||||
@assoc,
|
@assoc,
|
||||||
@assoc.my_module.experiment.project,
|
@assoc.my_module.experiment.project,
|
||||||
my_module: @assoc.my_module.id,
|
my_module: @assoc.my_module.id,
|
||||||
file: @asset.file_file_name
|
file: @asset.file_name
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
log_step_activity(
|
log_step_activity(
|
||||||
|
@ -229,7 +229,7 @@ class AssetsController < ApplicationController
|
||||||
@assoc,
|
@assoc,
|
||||||
nil,
|
nil,
|
||||||
protocol: @assoc.protocol.id,
|
protocol: @assoc.protocol.id,
|
||||||
file: @asset.file_file_name
|
file: @asset.file_name
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
when Result
|
when Result
|
||||||
|
|
|
@ -11,6 +11,8 @@ class StepText < ApplicationRecord
|
||||||
has_many :step_orderable_elements, as: :orderable, dependent: :destroy
|
has_many :step_orderable_elements, as: :orderable, dependent: :destroy
|
||||||
|
|
||||||
def name
|
def name
|
||||||
|
return if text.blank?
|
||||||
|
|
||||||
strip_tags(text.truncate(64))
|
strip_tags(text.truncate(64))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue