【发布时间】:2017-10-17 07:48:25
【问题描述】:
我的 haml 文件中有以下几行。
(Requested:
%strong<>
= comment.commentable.requested_check_in.present? ? comment.commentable.requested_check_in.strftime("%m/%d/%Y") : ""
="-"
= comment.commentable.requested_check_out.present? ? comment.commentable.requested_check_out.strftime("%m/%d/%Y") : ""
, Actual:
%strong<>
= comment.commentable.actual_check_in.present? ? comment.commentable.actual_check_in.strftime("%m/%d/%Y") : ""
="-"
= comment.commentable.actual_check_out.present? ? comment.commentable.actual_check_out.strftime("%m/%d/%Y") : ""
).
我想要的是后面有一个空格
(Requested: " "
但是这条线不起作用。
【问题讨论】:
-
生成的 HTML 是什么样子的,您的预期结果是什么?
标签: ruby-on-rails ruby haml