加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 如何在ruby slim中提供空白

发布时间:2020-12-17 01:51:02 所属栏目:百科 来源:网络整理
导读:我想用空格分隔货币和总额. 请建议我一个解决方案 任何帮助,将不胜感激. pstrong Total:span = @order.currency = humanized_money_with_symbol @order.total_paisas/100 解决方法 您可以通过字符串插值解决此问题,方法如下: pstrong Total:span = "#{@orde
我想用空格分隔货币和总额.

请建议我一个解决方案
任何帮助,将不胜感激.

p
strong Total:
span
    = @order.currency
    = humanized_money_with_symbol @order.total_paisas/100

解决方法

您可以通过字符串插值解决此问题,方法如下:

p
strong Total:
span
    = "#{@order.currency} #{humanized_money_with_symbol @order.total_paisas/100}"

或者像这样的非破坏性空间:

p
strong Total:
span
    = @order.currency
    |  
    = humanized_money_with_symbol @order.total_paisas/100

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读