我在S3上存储客户特定的部分内容。当我渲染S3对象的值时,它呈现为文本。如何渲染它以使其出现在我的主布局中?
看起来我只需要:
render :text => myTextFromS3, :layout => true
它的工作原理!
更新:自2013年以来铁路发生了变
有3种不同的方式:
render html: '<strong>HTML String</strong>' # render with `text/html` MIME type
render plain: 'plain text' # render with `text/plain` MIME type
render body: 'raw body' # render raw content, does not set content type, inherits
# default content type, which currently is `text/html`