【发布时间】:2018-09-15 14:16:09
【问题描述】:
我必须使用类 search-wrapper 向 div 添加一个数据属性,在 HTML 中它看起来像这样:
但是,我需要这样做的页面是在 HAML 中。我在弄清楚这个标签的性质在 HAML 中转换为什么来转换它时遇到了一些麻烦。到目前为止,我能得到的最接近的是:
.search_wrapper {:data-slideout-ignore => true}
这看起来很接近,但没有通过。有人可以解决这个问题吗?
【问题讨论】:
标签: ruby-on-rails haml nested-attributes custom-data-attribute