mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
16 lines
505 B
Ruby
16 lines
505 B
Ruby
# frozen_string_literal: true
|
|
|
|
module ProtocolImporters
|
|
class ProtocolDescriptionBuilder
|
|
def self.generate(protocol_json)
|
|
return '' unless protocol_json[:description]
|
|
|
|
html_string = ApplicationController
|
|
.renderer
|
|
.render(template: 'protocol_importers/templates/protocol_description',
|
|
layout: false,
|
|
assigns: { description: protocol_json[:description] })
|
|
html_string
|
|
end
|
|
end
|
|
end
|